Table of Contents

Class ClockSkew

Namespace
Codebelt.SharedKernel
Assembly
Codebelt.SharedKernel.dll

Represents a ClockSkew object that can be used to warrant for clock skew related scenarios such as authentication.

public record ClockSkew : ComparableValueObject<TimeSpan>, IEquatable<ValueObject>, IEquatable<SingleValueObject<TimeSpan>>, IComparisonOperators<ComparableValueObject<TimeSpan>, ComparableValueObject<TimeSpan>, bool>, IEqualityOperators<ComparableValueObject<TimeSpan>, ComparableValueObject<TimeSpan>, bool>, IEquatable<ComparableValueObject<TimeSpan>>, IEquatable<ClockSkew>
Inheritance
object
ClockSkew
Implements
Inherited Members
SingleValueObject<TimeSpan>.GetHashCode()
SingleValueObject<TimeSpan>.Equals(object)
SingleValueObject<TimeSpan>.Equals(ValueObject)
SingleValueObject<TimeSpan>.Equals(SingleValueObject<TimeSpan>)
SingleValueObject<TimeSpan>.<Clone>$()
SingleValueObject<TimeSpan>.EqualityContract

Remarks

Constructors

ClockSkew(TimeSpan)

Initializes a new instance of the ClockSkew class.

public ClockSkew(TimeSpan value)

Parameters

value TimeSpan

The TimeSpan value to assign the role of ClockSkew.

Exceptions

ArgumentOutOfRangeException

value cannot be less than MinValue -or- value cannot exceed MaxValue.

Fields

MaxValue

Denotes the largest possible value of ClockSkew.

public static readonly TimeSpan MaxValue

Field Value

TimeSpan

MinValue

Denotes the smallest possible value of ClockSkew.

public static readonly TimeSpan MinValue

Field Value

TimeSpan

Methods

FromMinutes(byte)

Returns a ClockSkew that represents a specified number of minutes.

public static ClockSkew FromMinutes(byte value)

Parameters

value byte

A number of minutes.

Returns

ClockSkew

A new instance of ClockSkew that represents value.

FromSeconds(ushort)

Returns a ClockSkew that represents a specified number of seconds.

public static ClockSkew FromSeconds(ushort value)

Parameters

value ushort

A number of seconds.

Returns

ClockSkew

A new instance of ClockSkew that represents value.

ToString()

Returns a string> that represents this instance.

public override string ToString()

Returns

string

A string> that represents this instance.

Operators

implicit operator TimeSpan(ClockSkew)

Performs an implicit conversion from TimeSpan to ClockSkew.

public static implicit operator TimeSpan(ClockSkew value)

Parameters

value ClockSkew

The value to convert.

Returns

TimeSpan

A TimeToLive that is equivalent to value.

implicit operator ClockSkew(TimeSpan)

Performs an implicit conversion from ClockSkew to TimeSpan.

public static implicit operator ClockSkew(TimeSpan value)

Parameters

value TimeSpan

The value to convert.

Returns

ClockSkew

A TimeSpan that is equivalent to value.

See Also