Class DriverVersion
Stores driver versioning data, comprised of driver date and 4 part version. Implements custom comparison and equality check for driver version
Inheritance
System.Object
DriverVersion
Implements
System.IComparable
Namespace: Microsoft.PackageGraph.MicrosoftUpdate.Metadata.Drivers
Assembly: package-graph-microsoft-update.dll
Syntax
public class DriverVersion : IComparable
Fields
| Improve this Doc View SourceDate
Drive date
Declaration
public DateTime Date
Field Value
Type | Description |
---|---|
System.DateTime |
Version
Driver version; 4 part version
Declaration
public ulong Version
Field Value
Type | Description |
---|---|
System.UInt64 |
Properties
| Improve this Doc View SourceVersionString
Gets the driver version in 4 part string format
Declaration
[JsonIgnore]
public string VersionString { get; }
Property Value
Type | Description |
---|---|
System.String | Driver version in 4 part format |
Methods
| Improve this Doc View SourceCompareTo(Object)
Compare two driver versions by date and version
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Other driver version to compare to |
Returns
Type | Description |
---|---|
System.Int32 | -1, 0, 1 for less than, equal and greated than respectively |
Equals(Object)
Equality override for driver versions.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Other driver version to check equality with |
Returns
Type | Description |
---|---|
System.Boolean | True if versions match (same date and version), false otherwise |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
GetHashCode override
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
System.Object.GetHashCode()
Implements
System.IComparable