C# Class Sage.Integration.Northwind.Application.API.Token

Inheritance: IComparable
Mostra file Open project: Sage/SData-Contracts Class Usage Examples

Public Methods

Method Description
CompareTo ( object obj ) : int

Compares the current instance with another object of the same type.

DeserializeToken ( string strToken ) : Token

Creates a new instance of type Token from a token's string representation.

GetId ( Token token ) : int
SerializeTokenToString ( Token token ) : string

Serializes an instance of type Token to a string.

The string representation is as followed: id + SequenceNo + InitRequest id: 29 chars SequenceNo: 10 chars InitRequest: 1 char (1=true; 0=false) Each part is right padded with ' '.

Token ( ) : System
Token ( Identity id, int sequenceNumber ) : System
Token ( Identity id, int sequenceNumber, bool initRequest ) : System

Method Details

CompareTo() public method

Compares the current instance with another object of the same type.
obj is not the same type as this instance.
public CompareTo ( object obj ) : int
obj object An object to compare with this instance.
return int

DeserializeToken() public static method

Creates a new instance of type Token from a token's string representation.
public static DeserializeToken ( string strToken ) : Token
strToken string The string representation of a token.
return Token

GetId() public static method

public static GetId ( Token token ) : int
token Token
return int

SerializeTokenToString() public static method

Serializes an instance of type Token to a string.
The string representation is as followed: id + SequenceNo + InitRequest id: 29 chars SequenceNo: 10 chars InitRequest: 1 char (1=true; 0=false) Each part is right padded with ' '.
public static SerializeTokenToString ( Token token ) : string
token Token The object to be serialized.
return string

Token() public method

public Token ( ) : System
return System

Token() public method

public Token ( Identity id, int sequenceNumber ) : System
id Identity
sequenceNumber int
return System

Token() public method

public Token ( Identity id, int sequenceNumber, bool initRequest ) : System
id Identity
sequenceNumber int
initRequest bool
return System