Class VariableLengthField8Ref
A reference to a variable length field with 1 byte Length field.
Implements
Inherited Members
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public class VariableLengthField8Ref : BaseComposite, IVariableLengthField, IComposite, IComparable<IVariableLengthField>, IEquatable<VariableLengthField8Ref>
Constructors
VariableLengthField8Ref()
Constructor.
Declaration
public VariableLengthField8Ref()
VariableLengthField8Ref(ResizableMessage, UnmanagedPointer)
Constructor.
Declaration
public VariableLengthField8Ref(ResizableMessage parentMessage, MemoryPointer.UnmanagedPointer buffer)
Parameters
Type | Name | Description |
---|---|---|
ResizableMessage | parentMessage | The message that owns this field. |
MemoryPointer.UnmanagedPointer | buffer | The memory region that contains the field value. |
VariableLengthField8Ref(Encoding)
Constructor.
Declaration
public VariableLengthField8Ref(Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
Encoding | encoding | Text encoding. |
VariableLengthField8Ref(Encoding, ResizableMessage, UnmanagedPointer)
Constructor.
Declaration
public VariableLengthField8Ref(Encoding encoding, ResizableMessage parentMessage, MemoryPointer.UnmanagedPointer buffer)
Parameters
Type | Name | Description |
---|---|---|
Encoding | encoding | Text encoding. |
ResizableMessage | parentMessage | The message that owns this field. |
MemoryPointer.UnmanagedPointer | buffer | The memory region that contains the field value. |
Properties
HasValue
Declaration
public override bool HasValue { get; }
Property Value
Type | Description |
---|---|
bool |
|
Overrides
this[string]
Gets or sets the subfield value.
Declaration
public override object this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
string | name | Subfield name. |
Property Value
Type | Description |
---|---|
object | Subfield value. |
Overrides
Length
Declaration
public ushort Length { get; }
Property Value
Type | Description |
---|---|
ushort | The length of variable data in bytes. |
LengthFieldSize
Declaration
public int LengthFieldSize { get; }
Property Value
Type | Description |
---|---|
int | The Length field size in bytes. |
RawValue
Declaration
public ReadOnlySpan<byte> RawValue { get; set; }
Property Value
Type | Description |
---|---|
ReadOnlySpan<byte> | Raw data. |
StringValue
Declaration
public string StringValue { get; set; }
Property Value
Type | Description |
---|---|
string | ASCII string. |
Methods
CompareTo(IVariableLengthField)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Declaration
public int CompareTo(IVariableLengthField other)
Parameters
Type | Name | Description |
---|---|---|
IVariableLengthField | other | An object to compare with this instance |
Returns
Type | Description |
---|---|
int | A value that indicates the relative order of the objects being compared. The return value has these meanings: - Less than zero - this instance precedes obj in the sort order. - Zero - this instance occurs in the same position in the sort order as obj. - Greater than zero - this instance follows obj in the sort order.. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | other is null. |
Equals(VariableLengthField8Ref)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(VariableLengthField8Ref other)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | other | An object to compare with this object |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the other parameter; otherwise, false |
Equals(object)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | An object to compare with this object |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the other parameter; otherwise, false |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object |
Overrides
Reset()
Resets the field to the null
value.
Declaration
public override void Reset()
Overrides
ToString()
Returns the text representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The text representation. |
Overrides
Wrap(ResizableMessage, UnmanagedPointer, bool)
Wraps the current object around the given memory region.
Declaration
public void Wrap(ResizableMessage parentMessage, MemoryPointer.UnmanagedPointer buffer, bool encode = false)
Parameters
Type | Name | Description |
---|---|---|
ResizableMessage | parentMessage | The parent message. |
MemoryPointer.UnmanagedPointer | buffer | The memory region that contains the field value. |
bool | encode | If |
Operators
operator ==(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator ==(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | left | |
VariableLengthField8Ref | right |
Returns
Type | Description |
---|---|
bool |
operator >(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator >(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | left | |
VariableLengthField8Ref | right |
Returns
Type | Description |
---|---|
bool |
operator >=(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator >=(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | left | |
VariableLengthField8Ref | right |
Returns
Type | Description |
---|---|
bool |
operator !=(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator !=(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | left | |
VariableLengthField8Ref | right |
Returns
Type | Description |
---|---|
bool |
operator <(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator <(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | left | |
VariableLengthField8Ref | right |
Returns
Type | Description |
---|---|
bool |
operator <=(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator <=(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField8Ref | left | |
VariableLengthField8Ref | right |
Returns
Type | Description |
---|---|
bool |