Class VariableLengthField16Ref
Represents MaturityMonthYear field.
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public class VariableLengthField16Ref : BaseComposite, IVariableLengthField, IComposite, IComparable<IVariableLengthField>, IEquatable<VariableLengthField16Ref>
Constructors
VariableLengthField16Ref()
Constructor.
Declaration
public VariableLengthField16Ref()
VariableLengthField16Ref(Encoding)
Constructor.
Text encoding.Declaration
public VariableLengthField16Ref(Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
Encoding | encoding |
VariableLengthField16Ref(Encoding, ResizableMessage, MemoryPointer<Byte>)
Constructor.
Declaration
public VariableLengthField16Ref(Encoding encoding, ResizableMessage parentMessage, MemoryPointer<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
Encoding | encoding | Text encoding. |
ResizableMessage | parentMessage | Parent message. |
MemoryPointer<System.Byte> | buffer | The buffer, which contains field value. |
VariableLengthField16Ref(ResizableMessage, MemoryPointer<Byte>)
Constructor.
Declaration
public VariableLengthField16Ref(ResizableMessage parentMessage, MemoryPointer<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
ResizableMessage | parentMessage | Parent message. |
MemoryPointer<System.Byte> | buffer | The buffer, which contains field value. |
Properties
HasValue
True, if the 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(VariableLengthField16Ref)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(VariableLengthField16Ref other)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | 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(VariableLengthField16Ref, VariableLengthField16Ref)
Declaration
public static bool operator ==(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | left | |
VariableLengthField16Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
GreaterThan(VariableLengthField16Ref, VariableLengthField16Ref)
Declaration
public static bool operator>(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | left | |
VariableLengthField16Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
GreaterThanOrEqual(VariableLengthField16Ref, VariableLengthField16Ref)
Declaration
public static bool operator >=(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | left | |
VariableLengthField16Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(VariableLengthField16Ref, VariableLengthField16Ref)
Declaration
public static bool operator !=(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | left | |
VariableLengthField16Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
LessThan(VariableLengthField16Ref, VariableLengthField16Ref)
Declaration
public static bool operator <(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | left | |
VariableLengthField16Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |
LessThanOrEqual(VariableLengthField16Ref, VariableLengthField16Ref)
Declaration
public static bool operator <=(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type | Name | Description |
---|---|---|
VariableLengthField16Ref | left | |
VariableLengthField16Ref | right |
Returns
Type | Description |
---|---|
System.Boolean |