• Version 4.4.3
Show / Hide Table of Contents

Class VariableLengthField16Ref

A reference to a variable length field with 2 bytes Length field.

Inheritance
object
BaseComposite
VariableLengthField16Ref
Implements
IVariableLengthField
IComposite
IComparable<IVariableLengthField>
IEquatable<VariableLengthField16Ref>
Inherited Members
BaseComposite.Buffer
BaseComposite.Wrap(MemoryPointer.UnmanagedPointer)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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(ResizableMessage, UnmanagedPointer)

Constructor.

Declaration
public VariableLengthField16Ref(ResizableMessage parentMessage, MemoryPointer.UnmanagedPointer buffer)
Parameters
Type Name Description
ResizableMessage parentMessage

The parent message.

MemoryPointer.UnmanagedPointer buffer

The memory region that contains the field value.

VariableLengthField16Ref(Encoding)

Constructor.

Declaration
public VariableLengthField16Ref(Encoding encoding)
Parameters
Type Name Description
Encoding encoding

Text encoding.

VariableLengthField16Ref(Encoding, ResizableMessage, UnmanagedPointer)

Constructor.

Declaration
public VariableLengthField16Ref(Encoding encoding, ResizableMessage parentMessage, MemoryPointer.UnmanagedPointer buffer)
Parameters
Type Name Description
Encoding encoding

Text encoding.

ResizableMessage parentMessage

The parent message.

MemoryPointer.UnmanagedPointer buffer

The memory region that contains the field value.

Properties

HasValue

Declaration
public override bool HasValue { get; }
Property Value
Type Description
bool

true if the underlying field has a non-null value, false otherwise.

Overrides
BaseComposite.HasValue

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
BaseComposite.this[string]

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

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(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
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
object.Equals(object)

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object

Overrides
object.GetHashCode()

Reset()

Resets the field to the null value.

Declaration
public override void Reset()
Overrides
BaseComposite.Reset()

ToString()

Returns the string representation.

Declaration
public override string ToString()
Returns
Type Description
string

The string representation.

Overrides
object.ToString()

Wrap(BaseGroup, UnmanagedPointer, bool)

Wraps the current object around the given memory region.

Declaration
public void Wrap(BaseGroup parentGroup, MemoryPointer.UnmanagedPointer buffer, bool encode = false)
Parameters
Type Name Description
BaseGroup parentGroup
MemoryPointer.UnmanagedPointer buffer

The memory region that contains the field value.

bool encode

If true sets header fields and resets optional fields.

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 true sets header fields and resets optional fields.

Operators

operator ==(VariableLengthField16Ref, VariableLengthField16Ref)

Declaration
public static bool operator ==(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type Name Description
VariableLengthField16Ref left
VariableLengthField16Ref right
Returns
Type Description
bool

operator >(VariableLengthField16Ref, VariableLengthField16Ref)

Declaration
public static bool operator >(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type Name Description
VariableLengthField16Ref left
VariableLengthField16Ref right
Returns
Type Description
bool

operator >=(VariableLengthField16Ref, VariableLengthField16Ref)

Declaration
public static bool operator >=(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type Name Description
VariableLengthField16Ref left
VariableLengthField16Ref right
Returns
Type Description
bool

operator !=(VariableLengthField16Ref, VariableLengthField16Ref)

Declaration
public static bool operator !=(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type Name Description
VariableLengthField16Ref left
VariableLengthField16Ref right
Returns
Type Description
bool

operator <(VariableLengthField16Ref, VariableLengthField16Ref)

Declaration
public static bool operator <(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type Name Description
VariableLengthField16Ref left
VariableLengthField16Ref right
Returns
Type Description
bool

operator <=(VariableLengthField16Ref, VariableLengthField16Ref)

Declaration
public static bool operator <=(VariableLengthField16Ref left, VariableLengthField16Ref right)
Parameters
Type Name Description
VariableLengthField16Ref left
VariableLengthField16Ref right
Returns
Type Description
bool

Implements

IVariableLengthField
IComposite
IComparable<T>
IEquatable<T>
In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX