Class DottedNumericBrowserVersion
- Namespace
- CSF.Extensions.WebDriver.Identification
- Assembly
- CSF.Extensions.WebDriver.dll
A BrowserVersion which is derived from a series of numeric components separated by period characters.
public sealed class DottedNumericBrowserVersion : BrowserVersion, IEquatable<BrowserVersion>, IComparable<BrowserVersion>
- Inheritance
-
DottedNumericBrowserVersion
- Implements
- Inherited Members
Remarks
This is similar to SemanticBrowserVersion except that it is far more forgiving of unusually-formatted versions.
- It permits any amount of leading and trailing non-numeric characters
- It permits any number of 'version' components, not just a maximum of 3 as is the case with SemVer
Constructors
DottedNumericBrowserVersion(IList<int>, bool)
Initialises a new instance of DottedNumericBrowserVersion
public DottedNumericBrowserVersion(IList<int> versionComponents, bool isPresumed = false)
Parameters
versionComponents
IList<int>The version components.
isPresumed
boolWhether or not this is a presumed version; see IsPresumedVersion.
Exceptions
- ArgumentNullException
If
versionComponents
is null.- ArgumentException
If
versionComponents
has a count of zero.
Properties
VersionComponents
Gets the collection of numeric version components.
public IReadOnlyList<int> VersionComponents { get; }
Property Value
- IReadOnlyList<int>
The version components.
Methods
CompareTo(BrowserVersion)
public override int CompareTo(BrowserVersion other)
Parameters
other
BrowserVersion
Returns
Equals(BrowserVersion)
public override bool Equals(BrowserVersion other)
Parameters
other
BrowserVersion
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
TryParse(string, out DottedNumericBrowserVersion, bool)
Attempts to parse the specified version string as a DottedNumericBrowserVersion.
public static bool TryParse(string version, out DottedNumericBrowserVersion result, bool isPresumed = false)
Parameters
version
stringThe version string
result
DottedNumericBrowserVersionExposes the result when this method returns true
isPresumed
boolWhether or not this is a presumed version; see IsPresumedVersion