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 class 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
-
ObjectSingleValueObject<TimeSpan>ComparableValueObject<TimeSpan>ClockSkew
- Implements
-
IEquatable<ValueObject>IEquatable<ClockSkew>
- Inherited Members
-
SingleValueObject<TimeSpan>.PrintMembers(StringBuilder)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
TimeSpanThe System.TimeSpan value to assign the role of ClockSkew.
Exceptions
- System.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
ByteA number of minutes.
Returns
FromSeconds(UInt16)
Returns a ClockSkew that represents a specified number of seconds.
public static ClockSkew FromSeconds(ushort value)
Parameters
value
UInt16A number of seconds.
Returns
ToString()
Returns a System.String> that represents this instance.
public override string ToString()
Returns
- String
A System.String> that represents this instance.
Operators
Implicit(ClockSkew to TimeSpan)
Performs an implicit conversion from System.TimeSpan to ClockSkew.
public static implicit operator TimeSpan(ClockSkew value)
Parameters
value
ClockSkewThe value to convert.
Returns
- TimeSpan
A TimeToLive that is equivalent to
value
.
Implicit(TimeSpan to ClockSkew)
Performs an implicit conversion from ClockSkew to System.TimeSpan.
public static implicit operator ClockSkew(TimeSpan value)
Parameters
value
TimeSpanThe value to convert.
Returns
- ClockSkew
A System.TimeSpan that is equivalent to
value
.