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
-
objectClockSkew
- 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
Exceptions
- ArgumentOutOfRangeException
valuecannot be less than MinValue -or-valuecannot exceed MaxValue.
Fields
MaxValue
Denotes the largest possible value of ClockSkew.
public static readonly TimeSpan MaxValue
Field Value
MinValue
Denotes the smallest possible value of ClockSkew.
public static readonly TimeSpan MinValue
Field Value
Methods
FromMinutes(byte)
Returns a ClockSkew that represents a specified number of minutes.
public static ClockSkew FromMinutes(byte value)
Parameters
valuebyteA number of minutes.
Returns
FromSeconds(ushort)
Returns a ClockSkew that represents a specified number of seconds.
public static ClockSkew FromSeconds(ushort value)
Parameters
valueushortA number of seconds.
Returns
ToString()
Returns a string> that represents this instance.
public override string ToString()
Returns
Operators
implicit operator TimeSpan(ClockSkew)
public static implicit operator TimeSpan(ClockSkew value)
Parameters
valueClockSkewThe value to convert.
Returns
- TimeSpan
A TimeToLive that is equivalent to
value.
implicit operator ClockSkew(TimeSpan)
public static implicit operator ClockSkew(TimeSpan value)
Parameters
valueTimeSpanThe value to convert.