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

Represents field data for a AMPS.Client.Message that consists of the bookmark. This is the AMPS Bookmark for the message. More...

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

Public Member Functions

 BookmarkField ()
 Default constructor. More...
 
 BookmarkField (string bookmark)
 Constructor with string version of a bookmark. More...
 
bool isTimestamp ()
 Indicates if this bookmark represents a timestamp. More...
 
bool isRange ()
 Indicates whether this bookmark likely represents a range, using only a simple check for brackets or parantheses. More...
 
bool isBookmarkList ()
 Identifies if this bookmark is a list of , separated bookmarks. More...
 
override string ToString ()
 Returns the bookmark as a string. More...
 
ulong getPublisherId ()
 Gets the numeric publisher id for this bookmark. More...
 
ulong getSequenceNumber ()
 Returns the sequence number for the bookmark or 0 if it's a timestamp. More...
 
IList< BookmarkFieldparseBookmarkList ()
 Parses a bookmark list to individual bookmarks. More...
 
Object clone ()
 Provides a way to duplicate this object and retain its specific type (and hashcode() implementation). More...
 
new BookmarkField copy ()
 Override base class's copy() method appropriately, so we don't inadvertently mix BookmarkField and Field up – they have different hashCode implementations. More...
 
override int GetHashCode ()
 
- 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...
 
virtual string getValue (Encoding decoder)
 Returns a string representation of the Field value, where the bytes are interpreted by using the specified decoder. 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...
 

Static Public Attributes

const int MAX_BOOKMARK_LENGTH = 42
 
const int MAX_TIMESTAMP_LENGTH = 24
 
const int MIN_TIMESTAMP_LENGTH = 10
 

Protected Member Functions

 BookmarkField (byte[] buffer, int position, int length)
 Constructor with 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

Represents field data for a AMPS.Client.Message that consists of the bookmark. This is the AMPS Bookmark for the message.

Constructor & Destructor Documentation

◆ BookmarkField() [1/3]

AMPS.Client.Fields.BookmarkField.BookmarkField ( )
inline

Default constructor.

◆ BookmarkField() [2/3]

AMPS.Client.Fields.BookmarkField.BookmarkField ( string  bookmark)
inline

Constructor with string version of a bookmark.

Parameters
bookmarkThe string containing the bookmark.

◆ BookmarkField() [3/3]

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

Constructor with specified buffer, position, and length.

Parameters
bufferThe byte array containing the bookmark field.
positionThe starting position of the bookmark field in the buffer.
lengthThe length of the bookmark field.

Member Function Documentation

◆ clone()

Object AMPS.Client.Fields.BookmarkField.clone ( )
inline

Provides a way to duplicate this object and retain its specific type (and hashcode() implementation).

Returns
A new instance of BookmarkField as an object.

◆ copy()

new BookmarkField AMPS.Client.Fields.BookmarkField.copy ( )
inline

Override base class's copy() method appropriately, so we don't inadvertently mix BookmarkField and Field up – they have different hashCode implementations.

Returns
A new instance of BookmarkField.

◆ getPublisherId()

ulong AMPS.Client.Fields.BookmarkField.getPublisherId ( )
inline

Gets the numeric publisher id for this bookmark.

Returns
The numeric publisher id for this bookmark or 0 if it's a timestamp.

◆ getSequenceNumber()

ulong AMPS.Client.Fields.BookmarkField.getSequenceNumber ( )
inline

Returns the sequence number for the bookmark or 0 if it's a timestamp.

◆ isBookmarkList()

bool AMPS.Client.Fields.BookmarkField.isBookmarkList ( )
inline

Identifies if this bookmark is a list of , separated bookmarks.

◆ isRange()

bool AMPS.Client.Fields.BookmarkField.isRange ( )
inline

Indicates whether this bookmark likely represents a range, using only a simple check for brackets or parantheses.

Returns
True if the value looks like a range.

◆ isTimestamp()

bool AMPS.Client.Fields.BookmarkField.isTimestamp ( )
inline

Indicates if this bookmark represents a timestamp.

Returns
True if the value looks like an AMPS ISO-8601 timestamp.

◆ parseBookmarkList()

IList<BookmarkField> AMPS.Client.Fields.BookmarkField.parseBookmarkList ( )
inline

Parses a bookmark list to individual bookmarks.

Returns
A list of BookmarkField.

◆ ToString()

override string AMPS.Client.Fields.BookmarkField.ToString ( )
inline

Returns the bookmark as a string.


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