Class Version

Namespace
NOpenNLP.Tools.Util
Assembly
NOpenNLP.Tools.dll

The Version class represents the OpenNlp Tools library version.

The version has three parts:

  • Major: OpenNlp Tools libraries with a different major version are not interchangeable.
  • Minor: OpenNlp Tools libraries with an identical major version, but different minor version may be interchangeable. See release notes for further details.
  • Revision: OpenNlp Tools libraries with same major and minor version, but a different revision, are fully interchangeable.
public class Version
Inheritance
Version
Inherited Members

Constructors

Version(int, int, int)

Initializes the current instance with the provided versions. The version will not be a snapshot version.

public Version(int major, int minor, int revision)

Parameters

major int
minor int
revision int

Version(int, int, int, bool)

Initializes the current instance with the provided versions.

public Version(int major, int minor, int revision, bool snapshot)

Parameters

major int
minor int
revision int
snapshot bool

Fields

DEV_VERSION

public static readonly Version DEV_VERSION

Field Value

Version

Properties

IsSnapshot

public virtual bool IsSnapshot { get; }

Property Value

bool

Major

Retrieves the major version.

public virtual int Major { get; }

Property Value

int

major version

Minor

Retrieves the minor version.

public virtual int Minor { get; }

Property Value

int

minor version

Revision

Retrieves the revision version.

public virtual int Revision { get; }

Property Value

int

revision version

Methods

CurrentVersion()

Retrieves the current version of the OpenNlp Tools library.

public static Version CurrentVersion()

Returns

Version

the current version

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Parse(string)

Return a new Version initialized to the value represented by the specified string

public static Version Parse(string version)

Parameters

version string

the string to be parsed

Returns

Version

the version represented by the string value

Exceptions

FormatException

if the string does not contain a valid version

ToString()

Retrieves the version string.

The Parse(string) method can create an instance of Version with the returned version value string.

public override string ToString()

Returns

string

the version value string