Table of Contents

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 bool

Whether 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

int

Equals(BrowserVersion)

public override bool Equals(BrowserVersion other)

Parameters

other BrowserVersion

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

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 string

The version string

result DottedNumericBrowserVersion

Exposes the result when this method returns true

isPresumed bool

Whether or not this is a presumed version; see IsPresumedVersion

Returns

bool

true if the parsing succeeded; false if not.