AMPS C# Client  5.3.5.0
AMPS C# Client for .NET
AMPS.Client.Fields.OptionsField Class Reference

Field data for a AMPS.Client.Message which consists of options. These options represent the possible values for message options in an AMPS command. More...

+ Inheritance diagram for AMPS.Client.Fields.OptionsField:

Public Member Functions

 OptionsField ()
 Initializes a new instance of the OptionsField class. More...
 
 OptionsField (string options)
 Initializes a new instance of the OptionsField class with the specified options. More...
 
override string getValue (Encoding decoder)
 Gets the value of this options field using the specified decoder. More...
 
override bool Equals (Object obj)
 For two OptionsFields to be considered equal, their values must have the same length and all bytes in the value must be equal, other than a possible trailing comma. More...
 
override int GetHashCode ()
 Returns the hash code for this options field. More...
 
- Public Member Functions inherited from AMPS.Client.Fields.StringField
 StringField (string value)
 Initializes a new instance of the StringField class with the specified string value. More...
 
 StringField ()
 Default constructor. More...
 
bool getValue (byte[] v)
 Writes the byte value of this instance into the specified byte buffer, if the value is not null. More...
 
bool getValue (CommandId v)
 Writes the byte value of this instance into the specified command ID object, if the value is not null. More...
 
void setValue (byte[] v, int offset, int length)
 Sets the value of this instance with the specified region of a byte buffer. More...
 
void setValue (CommandId v)
 Sets the value of this instance from the specified command ID. More...
 
void setValue (string v, Encoding encoder)
 Sets the value of this instance from the specified string. The characters of the string are interpreted using the specified encoder. This method makes its own copy of the bytes. More...
 
- Public Member Functions inherited from AMPS.Client.Fields.Field
 Field ()
 Default construntotor. More...
 
 Field (string value)
 Constructs an instance with the bytes of the specified string value. The string is interpreted as the UTF-8 representation. More...
 
 Field (byte[] buffer, int position, int length)
 Constructs an instance with the specified region of a byte buffer. Note: the bytes are not copied from the buffer. The specified buffer region is referenced by this instance. More...
 
void set (byte[] buffer, int position, int length)
 Sets the value of this instance with the specified region of a byte buffer. Note: the bytes are not copied from the buffer. The specified buffer region is referenced by this instance. More...
 
void set (byte[] buffer)
 Sets the value of this instance with the specified buffer. Note: the bytes are not copied from the buffer. The buffer is referenced by this instance. More...
 
bool isNull ()
 Indicates whether this instance's value is null. More...
 
void reset ()
 Resets the value of this instance to null. More...
 
byte byteAt (int i)
 Returns the byte at position plus index i. More...
 
override bool Equals (Object obj)
 Default implementation for Object#equals for a Field. For two Fields to be considered equal, their values must have the same length and all bytes in the value must be equal. More...
 
override int GetHashCode ()
 Gets the hash code for the Field. More...
 
Field copy ()
 Constructs a new Field and sets its value to a deep copy of this instance. More...
 
virtual void copyFrom (Field f)
 Provides a way to make this object a duplicate of f. More...
 

Protected Member Functions

 OptionsField (byte[] buffer, int position, int length)
 Initializes a new instance of the OptionsField class with the specified buffer, position, and length. More...
 
- Protected Member Functions inherited from AMPS.Client.Fields.StringField
 StringField (byte[] buffer, int position, int length)
 Initializes a new instance of the StringField class with the specified buffer, position, and length. More...
 

Additional Inherited Members

- Public Attributes inherited from AMPS.Client.Fields.Field
byte[] buffer = null
 
int position = 0
 
int length = 0
 
- Static Protected Attributes inherited from AMPS.Client.Fields.StringField
const string LATIN1 = "ISO-8859-1"
 
const byte LATIN1_ZERO = 48
 

Detailed Description

Field data for a AMPS.Client.Message which consists of options. These options represent the possible values for message options in an AMPS command.

Constructor & Destructor Documentation

◆ OptionsField() [1/3]

AMPS.Client.Fields.OptionsField.OptionsField ( )
inline

Initializes a new instance of the OptionsField class.

◆ OptionsField() [2/3]

AMPS.Client.Fields.OptionsField.OptionsField ( string  options)
inline

Initializes a new instance of the OptionsField class with the specified options.

Parameters
optionsThe options to be set for the field.

◆ OptionsField() [3/3]

AMPS.Client.Fields.OptionsField.OptionsField ( byte[]  buffer,
int  position,
int  length 
)
inlineprotected

Initializes a new instance of the OptionsField class with the specified buffer, position, and length.

Parameters
bufferThe byte array buffer containing the options.
positionThe starting position of the options within the buffer.
lengthThe length of the options.

Member Function Documentation

◆ Equals()

override bool AMPS.Client.Fields.OptionsField.Equals ( Object  obj)
inline

For two OptionsFields to be considered equal, their values must have the same length and all bytes in the value must be equal, other than a possible trailing comma.

Parameters
objThe object to compare with this options field.
Returns
True if the options field is equal to the specified object; otherwise, false.

◆ GetHashCode()

override int AMPS.Client.Fields.OptionsField.GetHashCode ( )
inline

Returns the hash code for this options field.

Returns
The hash code.

◆ getValue()

override string AMPS.Client.Fields.OptionsField.getValue ( Encoding  decoder)
inlinevirtual

Gets the value of this options field using the specified decoder.

Parameters
decoderThe encoding decoder to use.
Returns
The value of the options field as a string.

Reimplemented from AMPS.Client.Fields.StringField.


The documentation for this class was generated from the following file: