Class VariableLengthField8Ref
Represents MaturityMonthYear field.
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(Encoding)
Constructor.
Text encoding.Declaration
public VariableLengthField8Ref(Encoding encoding)
Parameters
| Type | Name | Description |
|---|---|---|
| Encoding | encoding |
VariableLengthField8Ref(Encoding, ResizableMessage, MemoryPointer<Byte>)
Constructor.
Declaration
public VariableLengthField8Ref(Encoding encoding, ResizableMessage parentMessage, MemoryPointer<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| Encoding | encoding | Text encoding. |
| ResizableMessage | parentMessage | Message which owns this field. |
| MemoryPointer<System.Byte> | buffer | The buffer, which contains field value. |
VariableLengthField8Ref(ResizableMessage, MemoryPointer<Byte>)
Constructor.
Declaration
public VariableLengthField8Ref(ResizableMessage parentMessage, MemoryPointer<byte> buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ResizableMessage | parentMessage | Message which owns this field. |
| MemoryPointer<System.Byte> | buffer | The buffer, which contains field value. |
Properties
HasValue
True, if field has not null value, false otherwise.
Declaration
public override bool HasValue { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Item[String]
Returns value of composite type field.
Declaration
public override object this[string name] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Field name |
Property Value
| Type | Description |
|---|---|
| System.Object | Value of composite type field |
Overrides
Length
Declaration
public ushort Length { get; }
Property Value
| Type | Description |
|---|---|
| System.UInt16 |
LengthFieldSize
Size of Length field.
Declaration
public int LengthFieldSize { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
RawValue
Declaration
public ReadOnlySpan<byte> RawValue { get; set; }
Property Value
| Type | Description |
|---|---|
| ReadOnlySpan<System.Byte> |
StringValue
Declaration
public string StringValue { get; set; }
Property Value
| Type | Description |
|---|---|
| System.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 |
|---|---|
| System.Int32 | A value that indicates the relative order of the objects being compared. The return value has these meanings:
|
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 |
|---|---|
| System.Boolean | 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 |
|---|---|---|
| System.Object | obj | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the current object is equal to the other parameter; otherwise, false. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A hash code for the current object. |
Reset()
Declaration
public override void Reset()
Overrides
ToString()
Returns the string representation of an object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | The string representation of an object. |
Wrap(ResizableMessage, MemoryPointer<Byte>, Boolean)
Wraps current object around the buffer.
Declaration
public void Wrap(ResizableMessage parentMessage, MemoryPointer<byte> buffer, bool encode = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ResizableMessage | parentMessage | Parent message. |
| MemoryPointer<System.Byte> | buffer | The buffer, which contains field value. |
| System.Boolean | encode | If true, will set header fields and reset optional fields. |
Operators
Equality(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator ==(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| VariableLengthField8Ref | left | |
| VariableLengthField8Ref | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GreaterThan(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator>(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| VariableLengthField8Ref | left | |
| VariableLengthField8Ref | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GreaterThanOrEqual(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator >=(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| VariableLengthField8Ref | left | |
| VariableLengthField8Ref | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Inequality(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator !=(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| VariableLengthField8Ref | left | |
| VariableLengthField8Ref | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |
LessThan(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator <(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| VariableLengthField8Ref | left | |
| VariableLengthField8Ref | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |
LessThanOrEqual(VariableLengthField8Ref, VariableLengthField8Ref)
Declaration
public static bool operator <=(VariableLengthField8Ref left, VariableLengthField8Ref right)
Parameters
| Type | Name | Description |
|---|---|---|
| VariableLengthField8Ref | left | |
| VariableLengthField8Ref | right |
Returns
| Type | Description |
|---|---|
| System.Boolean |