AMPS C# Client  5.3.3.4
AMPS C# Client for .NET
AMPS.Client.CommandId Class Reference

Used to give a unique identifier to a Command. This Id can be used to reference the command later, such as when unsubscribing a subscription command. More...

Public Member Functions

 CommandId (String value)
 Constructs a CommandId for an AMPS command, using a string as its idenifier. More...
 
 CommandId (byte[] buffer)
 Constructs a CommandId for an AMPS command, using an array of bytes as its identifier. More...
 
 CommandId (byte[] buffer, int position, int length)
 Constructs a CommandId for an AMPS command, using an array of bytes, a position number, and a length as its identifier. More...
 
void set (byte[] buffer, int position, int length)
 Replaces the current id with the supplied identifier. More...
 
CommandId copy ()
 Return a copy of self with its own buffer. More...
 
override bool Equals (object obj)
 Overridden to test equality based upon object class and the CommandId value. For this to return ture, the passed in instance must be an instance of CommandId and its value must be binary equal to this instance's value. More...
 
override int GetHashCode ()
 Overridden to return the has code that is based upon CommandId value. More...
 
override string ToString ()
 Overridden to return the CommandId value as a string where each byte is interpreted as an ISO-8859-1 character. More...
 

Static Public Member Functions

static CommandId nextIdentifier ()
 Creates and initializes a new, unique CommandId More...
 

Public Attributes

byte[] id = null
 

Detailed Description

Used to give a unique identifier to a Command. This Id can be used to reference the command later, such as when unsubscribing a subscription command.

Constructor & Destructor Documentation

◆ CommandId() [1/3]

AMPS.Client.CommandId.CommandId ( String  value)
inline

Constructs a CommandId for an AMPS command, using a string as its idenifier.

Parameters
valueA string used to set the new identifier for this AMPS command.

◆ CommandId() [2/3]

AMPS.Client.CommandId.CommandId ( byte[]  buffer)
inline

Constructs a CommandId for an AMPS command, using an array of bytes as its identifier.

Parameters
bufferAn array of bytes used to set the new identifier for this AMPS command.

◆ CommandId() [3/3]

AMPS.Client.CommandId.CommandId ( byte[]  buffer,
int  position,
int  length 
)
inline

Constructs a CommandId for an AMPS command, using an array of bytes, a position number, and a length as its identifier.

Parameters
bufferAn array of bytes used to set the new identifier for this AMPS command.
positionAn integer used to represent the position that the buffer should start.
lengthAn integer used to determine the length of the new identifier.

Member Function Documentation

◆ copy()

CommandId AMPS.Client.CommandId.copy ( )
inline

Return a copy of self with its own buffer.

◆ Equals()

override bool AMPS.Client.CommandId.Equals ( object  obj)
inline

Overridden to test equality based upon object class and the CommandId value. For this to return ture, the passed in instance must be an instance of CommandId and its value must be binary equal to this instance's value.

◆ GetHashCode()

override int AMPS.Client.CommandId.GetHashCode ( )
inline

Overridden to return the has code that is based upon CommandId value.

◆ nextIdentifier()

static CommandId AMPS.Client.CommandId.nextIdentifier ( )
inlinestatic

Creates and initializes a new, unique CommandId

Returns
A new CommandId

◆ set()

void AMPS.Client.CommandId.set ( byte[]  buffer,
int  position,
int  length 
)
inline

Replaces the current id with the supplied identifier.

Parameters
bufferA set of ASCII bytes corresponding to the Base64-encoded UUID. This should always be 24 bytes long.
positionThe position in buffer buffer

where the UUID begins.

Parameters
lengthThe length of the UUID beginning at position . The behavior is undefined if this value is not 24.

◆ ToString()

override string AMPS.Client.CommandId.ToString ( )
inline

Overridden to return the CommandId value as a string where each byte is interpreted as an ISO-8859-1 character.


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