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
versionComponentsIList<int>The version components.
isPresumedboolWhether or not this is a presumed version; see IsPresumedVersion.
Exceptions
- ArgumentNullException
If
versionComponentsis null.- ArgumentException
If
versionComponentshas 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
otherBrowserVersion
Returns
Equals(BrowserVersion)
public override bool Equals(BrowserVersion other)
Parameters
otherBrowserVersion
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
versionstringThe version string
resultDottedNumericBrowserVersionExposes the result when this method returns true
isPresumedboolWhether or not this is a presumed version; see IsPresumedVersion