C# Class HandCoded.FpML.Util.Version

Instances of the Version class hold a version number expressed as two major and minor component values. Instances can be compared to determine equality and relative ordering.
Inheritance: IComparable
Exibir arquivo Open project: formicary/fpml-toolkit-csharp Class Usage Examples

Public Methods

Method Description
CompareTo ( Object other ) : int

Returns the result of comparing this instance to another Object.

CompareTo ( Version other ) : int

Compares two Version instances to determine thier relative ordering.

Equals ( Version other ) : bool

Compares two Version instances and determines if they contain the same version number.

Equals ( object other ) : bool

Determines if this Version instance and another hold the same version number.

GetHashCode ( ) : int

Returns the hash value of the date for hash based data structures and algorithms.

Parse ( string version ) : Version

Parse the FpML version number given as an argument and return a corresponding Version instance. A hash table is used to lookup previously converted strings.

ToString ( ) : string

Converts the instance data members to a string representation that can be displayed for debugging purposes.

Private Methods

Method Description
Version ( int major, int minor ) : System

Constructs a Version instance from major and minor component values.

Version ( string version ) : System

Constructs a Version instance from a 'major-minor' format string value.

Method Details

CompareTo() public method

Returns the result of comparing this instance to another Object.
If the argument is not a /// Date instance.
public CompareTo ( Object other ) : int
other Object The instance to compare with.
return int

CompareTo() public method

Compares two Version instances to determine thier relative ordering.
public CompareTo ( Version other ) : int
other Version The Version instance to compare with.
return int

Equals() public method

Compares two Version instances and determines if they contain the same version number.
public Equals ( Version other ) : bool
other Version The Version instance to compare with.
return bool

Equals() public method

Determines if this Version instance and another hold the same version number.
public Equals ( object other ) : bool
other object The instance to compare with.
return bool

GetHashCode() public method

Returns the hash value of the date for hash based data structures and algorithms.
public GetHashCode ( ) : int
return int

Parse() public static method

Parse the FpML version number given as an argument and return a corresponding Version instance. A hash table is used to lookup previously converted strings.
public static Parse ( string version ) : Version
version string The version number string.
return Version

ToString() public method

Converts the instance data members to a string representation that can be displayed for debugging purposes.
public ToString ( ) : string
return string