public struct BigtableByteString : IComparable, IComparable<BigtableByteString>, IEquatable<BigtableByteString>, IEnumerable<byte>, IEnumerable
Reference documentation and code samples for the Google.Cloud.Bigtable.Common.V2 struct BigtableByteString.
A sequence of bytes which can be used for a row key, column qualifier, or cell value.
Implements
IComparable, IComparableBigtableByteString, IEquatableBigtableByteString, IEnumerablebyte, IEnumerableNamespace
Google.Cloud.Bigtable.Common.V2Assembly
Google.Cloud.Bigtable.Common.V2.dll
Constructors
BigtableByteString(ByteString)
public BigtableByteString(ByteString value)
Creates a BigtableByteString value from a byte string.
Parameter | |
---|---|
Name | Description |
value | ByteString The byte string making up the value. May be null in which case the empty byte string is used. |
BigtableByteString(params byte[])
public BigtableByteString(params byte[] value)
Creates a BigtableByteString value from an array of bytes.
Parameter | |
---|---|
Name | Description |
value | byte The bytes making up the byte string. May be null in which case the empty byte string is used. |
BigtableByteString(long)
public BigtableByteString(long value)
Creates a BigtableByteString value from the big-endian encoding of a signed 64-bit value.
Parameter | |
---|---|
Name | Description |
value | long The 64-bit value which should be used to initialize the byte string. |
BigtableByteString(string)
public BigtableByteString(string valueAsUtf8)
Creates a BigtableByteString value from the UTF-8 encoding of a string.
Parameter | |
---|---|
Name | Description |
valueAsUtf8 | string The value whose UTF-8 representation should be used to initialize the byte string. May be null in which case the empty byte string is used. |
Properties
IsEmpty
public bool IsEmpty { get; }
Returns true if the byte string is empty, false otherwise.
Property Value | |
---|---|
Type | Description |
bool |
this[int]
public byte this[int index] { get; }
Returns the byte at index index
.
Parameter | |
---|---|
Name | Description |
index | int The index in the byte string to return. Must be greater than or equal to 0, and less than Length. |
Property Value | |
---|---|
Type | Description |
byte | The byte at index |
Length
public int Length { get; }
Gets the number of bytes in the byte string.
Property Value | |
---|---|
Type | Description |
int |
Value
public ByteString Value { get; }
Gets the underlying byte string.
Property Value | |
---|---|
Type | Description |
ByteString |
Methods
Compare(BigtableByteString, BigtableByteString)
public static int Compare(BigtableByteString x, BigtableByteString y)
Compares two BigtableByteString values lexicographically.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
int | true if |
CompareTo(BigtableByteString)
public int CompareTo(BigtableByteString other)
Parameter | |
---|---|
Name | Description |
other | BigtableByteString |
Returns | |
---|---|
Type | Description |
int |
CompareTo(object)
public int CompareTo(object obj)
Parameter | |
---|---|
Name | Description |
obj | object |
Returns | |
---|---|
Type | Description |
int |
GetEnumerator()
public IEnumerator<byte> GetEnumerator()
Returns | |
---|---|
Type | Description |
IEnumeratorbyte |
GetHashCode()
public override int GetHashCode()
Returns | |
---|---|
Type | Description |
int |
ToString()
public override string ToString()
Returns | |
---|---|
Type | Description |
string |
Operators
operator ==(BigtableByteString, BigtableByteString)
public static bool operator ==(BigtableByteString x, BigtableByteString y)
Operator overload to compare two BigtableByteString values for equality.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
bool | true if |
explicit operator ByteString(BigtableByteString)
public static explicit operator ByteString(BigtableByteString value)
Converts the BigtableByteString value to its underlying byte string.
Parameter | |
---|---|
Name | Description |
value | BigtableByteString The BigtableByteString value to convert. |
Returns | |
---|---|
Type | Description |
ByteString |
explicit operator byte[](BigtableByteString)
public static explicit operator byte[](BigtableByteString value)
Converts the BigtableByteString value to its underlying byte array.
Parameter | |
---|---|
Name | Description |
value | BigtableByteString The BigtableByteString value to convert. |
Returns | |
---|---|
Type | Description |
byte |
explicit operator long(BigtableByteString)
public static explicit operator long(BigtableByteString value)
Converts the BigtableByteString value to its a signed 64-bit value assuming it is big-endian encoded.
Parameter | |
---|---|
Name | Description |
value | BigtableByteString The BigtableByteString value to convert. |
Returns | |
---|---|
Type | Description |
long |
explicit operator string(BigtableByteString)
public static explicit operator string(BigtableByteString value)
Converts the BigtableByteString value to a string assuming it is UTF-8 encoded.
Parameter | |
---|---|
Name | Description |
value | BigtableByteString The BigtableByteString value to convert. |
Returns | |
---|---|
Type | Description |
string |
operator >(BigtableByteString, BigtableByteString)
public static bool operator >(BigtableByteString x, BigtableByteString y)
Operator overload to compare two BigtableByteString values.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
bool | true if |
operator >=(BigtableByteString, BigtableByteString)
public static bool operator >=(BigtableByteString x, BigtableByteString y)
Operator overload to compare two BigtableByteString values.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
bool | true if |
implicit operator BigtableByteString(ByteString)
public static implicit operator BigtableByteString(ByteString value)
Converts a byte string to a BigtableByteString value.
Parameter | |
---|---|
Name | Description |
value | ByteString The byte string making up the value. May be null in which case the empty byte string is used. |
Returns | |
---|---|
Type | Description |
BigtableByteString |
implicit operator BigtableByteString(byte[])
public static implicit operator BigtableByteString(byte[] value)
Converts a byte array to a BigtableByteString value.
Parameter | |
---|---|
Name | Description |
value | byte The bytes making up the byte string. May be null in which case the empty byte string is used. |
Returns | |
---|---|
Type | Description |
BigtableByteString |
implicit operator BigtableByteString(long)
public static implicit operator BigtableByteString(long value)
Converts the big-endian encoding of a signed 64-bit value to a BigtableByteString value.
Parameter | |
---|---|
Name | Description |
value | long The 64-bit value which should be used to initialize the byte string. |
Returns | |
---|---|
Type | Description |
BigtableByteString |
implicit operator BigtableByteString(string)
public static implicit operator BigtableByteString(string valueAsUtf8)
Converts the UTF-8 encoding of a string to a BigtableByteString value.
Parameter | |
---|---|
Name | Description |
valueAsUtf8 | string The value whose UTF-8 representation should be used to initialize the byte string. May be null in which case the empty byte string is used. |
Returns | |
---|---|
Type | Description |
BigtableByteString |
operator !=(BigtableByteString, BigtableByteString)
public static bool operator !=(BigtableByteString x, BigtableByteString y)
Operator overload to compare two BigtableByteString values for inequality.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
bool | true if |
operator <(BigtableByteString, BigtableByteString)
public static bool operator <(BigtableByteString x, BigtableByteString y)
Operator overload to compare two BigtableByteString values.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
bool | true if |
operator <=(BigtableByteString, BigtableByteString)
public static bool operator <=(BigtableByteString x, BigtableByteString y)
Operator overload to compare two BigtableByteString values.
Parameters | |
---|---|
Name | Description |
x | BigtableByteString Left value to compare |
y | BigtableByteString Right value to compare |
Returns | |
---|---|
Type | Description |
bool | true if |