|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents the version number for an assembly, operating system, or component. More...
#include <Version.h>
Public Member Functions | |
| Version () | |
| Initializes a new instance of the Version class to 0.0.0.0. | |
| Version (int iMajor, int iMinor) | |
| Initializes a new instance of the Version class using specified major and minor numbers. | |
| Version (int iMajor, int iMinor, int iBuild) | |
| Initializes a new instance of the Version class using specified major, minor, and build numbers. | |
| Version (int iMajor, int iMinor, int iBuild, int iRevision) | |
| Initializes a new instance of the Version class using specified major, minor, build, and revision numbers. | |
| int | GetBuild () const |
| Gets the value of the build component of the version number. | |
| int | GetMajor () const |
| Gets the value of the major component of the version number. | |
| int | GetMinor () const |
| Gets the value of the minor component of the version number. | |
| int | GetRevision () const |
| Gets the value of the revision component of the version number. | |
| bool | operator!= (const Version &vOther) const |
| Determines whether two Version instances are not equal. | |
| bool | operator== (const Version &vOther) const |
| Determines whether two Version instances are equal. | |
| String | ToString () const |
| Converts the value of the current Version object to its equivalent String representation. | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Static Public Member Functions | |
| static Version | Parse (const String &sInput) |
| Converts the string representation of a version number to an equivalent Version object. | |
| static bool | TryParse (const String &sInput, Version &vResult) |
| Tries to convert the string representation of a version number to an equivalent Version object. | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Represents the version number for an assembly, operating system, or component.
Conforms to .NET System.Version with 2, 3, or 4 component formats: major.minor[.build[.revision]]. Immutable once constructed and thread-safe for concurrent read access.
| DotNetDupe::System::Version::Version | ( | int | iMajor, |
| int | iMinor, | ||
| int | iBuild, | ||
| int | iRevision ) |
Initializes a new instance of the Version class using specified major, minor, build, and revision numbers.
| iMajor | The major version component. |
| iMinor | The minor version component. |
| iBuild | The build version component. |
| iRevision | The revision version component. |
Definition at line 68 of file Version.cpp.
Referenced by operator!=(), operator==(), Parse(), and TryParse().
| DotNetDupe::System::Version::Version | ( | int | iMajor, |
| int | iMinor, | ||
| int | iBuild ) |
Initializes a new instance of the Version class using specified major, minor, and build numbers.
| iMajor | The major version component. |
| iMinor | The minor version component. |
| iBuild | The build version component. |
Definition at line 71 of file Version.cpp.
| DotNetDupe::System::Version::Version | ( | int | iMajor, |
| int | iMinor ) |
Initializes a new instance of the Version class using specified major and minor numbers.
| iMajor | The major version component. |
| iMinor | The minor version component. |
Definition at line 74 of file Version.cpp.
| DotNetDupe::System::Version::Version | ( | ) |
Initializes a new instance of the Version class to 0.0.0.0.
Definition at line 77 of file Version.cpp.
Referenced by DotNetDupe::System::Environment::GetOperatingSystem(), and TryParse().
| int DotNetDupe::System::Version::GetBuild | ( | ) | const |
Gets the value of the build component of the version number.
Definition at line 88 of file Version.cpp.
| int DotNetDupe::System::Version::GetMajor | ( | ) | const |
Gets the value of the major component of the version number.
Definition at line 80 of file Version.cpp.
| int DotNetDupe::System::Version::GetMinor | ( | ) | const |
Gets the value of the minor component of the version number.
Definition at line 84 of file Version.cpp.
| int DotNetDupe::System::Version::GetRevision | ( | ) | const |
Gets the value of the revision component of the version number.
Definition at line 92 of file Version.cpp.
| bool DotNetDupe::System::Version::operator!= | ( | const Version & | vOther | ) | const |
Determines whether two Version instances are not equal.
| vOther | The Version instance to compare with the current instance. |
Definition at line 131 of file Version.cpp.
References Version().
| bool DotNetDupe::System::Version::operator== | ( | const Version & | vOther | ) | const |
Determines whether two Version instances are equal.
| vOther | The Version instance to compare with the current instance. |
Definition at line 124 of file Version.cpp.
References Version().
Converts the string representation of a version number to an equivalent Version object.
| sInput | String containing 2 to 4 integer components separated by dots. |
| ArgumentException | Thrown when string format is invalid or component values are out of range. |
Definition at line 102 of file Version.cpp.
References DotNetDupe::System::ArgumentException::ArgumentException(), DotNetDupe::System::FormatException::FormatException(), Version(), DotNetDupe::System::String::IsEmpty(), and TryParse().
| String DotNetDupe::System::Version::ToString | ( | ) | const |
Converts the value of the current Version object to its equivalent String representation.
Definition at line 96 of file Version.cpp.
References DotNetDupe::System::String::String().
Tries to convert the string representation of a version number to an equivalent Version object.
| sInput | String containing the version representation. |
| vResult | Output Version instance populated on success. |
Definition at line 113 of file Version.cpp.
References Version(), Version(), and DotNetDupe::System::TryParseInternal().
Referenced by Parse().