TimeBase Struct
The time base used to convert the time when persisting data.
public readonly struct TimeBase : System.IEquatable<HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase>, HAKOM.TSM.Net.Api.IEnumeration<HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase, int>, HAKOM.TSM.Net.Api.IEnumeration<HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase>Implements System.IEquatable<TimeBase>, HAKOM.TSM.Net.Api.IEnumeration<TimeBase,System.Int32>, HAKOM.TSM.Net.Api.IEnumeration<TimeBase>
Properties
Section titled “Properties”TimeBase.Value Property
Section titled “TimeBase.Value Property”The value of the time base.
public int Value { get; init; }Implements Value
Property Value
Section titled “Property Value”Methods
Section titled “Methods”TimeBase.Create(int) Method
Section titled “TimeBase.Create(int) Method”Creates a time base with a custom value.
public static HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase Create(int value);Parameters
Section titled “Parameters”value System.Int32
Returns
Section titled “Returns”TimeBase
A new TimeBase instance.
TimeBase.Default() Method
Section titled “TimeBase.Default() Method”Creates a default time base. The default instance is Hakom second.
public static HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase Default();Returns
Section titled “Returns”TimeBase
A new instance of TimeBase with the default value.
TimeBase.Equals(TimeBase) Method
Section titled “TimeBase.Equals(TimeBase) Method”Compares the value of this time base to another time base returning a boolean.
public bool Equals(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase other);Parameters
Section titled “Parameters”other TimeBase
The TimeBase used for comparison.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the time bases are equal (true) or not equal(false).
TimeBase.Equals(object) Method
Section titled “TimeBase.Equals(object) Method”Compares the value of this time base to another time base returning a boolean.
public override bool Equals(object? obj);Parameters
Section titled “Parameters”obj System.Object
The TimeBase used for comparison.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the time bases are equal (true) or not equal(false).
TimeBase.GetHashCode() Method
Section titled “TimeBase.GetHashCode() Method”Creates the hash code for this time base, using its value.
public override int GetHashCode();Returns
Section titled “Returns”System.Int32
A hash code for this time base.
TimeBase.HakomSecond() Method
Section titled “TimeBase.HakomSecond() Method”Creates a time base similar to unix seconds but with a different timezone (UTC+1) and starting point. (0 = 01.01.1972 00:00:00 UTC+1).
public static HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase HakomSecond();Returns
Section titled “Returns”TimeBase
A new TimeBase instance with value 0.
TimeBase.ToString() Method
Section titled “TimeBase.ToString() Method”Display the name and numeric value of the TimeBase as formated string.
public override string ToString();Returns
Section titled “Returns”System.String
The name and numeric value in the following format Name (Value).
TimeBase.TryCreate(int) Method
Section titled “TimeBase.TryCreate(int) Method”Attempts to create a time base based on the given value.
public static HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase> TryCreate(int value);Parameters
Section titled “Parameters”value System.Int32
The value to create the time base from
Returns
Section titled “Returns”HAKOM.ErrorHandling.Core.Net.Api.Result<TimeBase>
A Result<TValue> representing either success or failure of creating a time base with the given value.
TimeBase.UnixMillisecond() Method
Section titled “TimeBase.UnixMillisecond() Method”Creates a time base for unix milliseconds. The time is persisted in unix milliseconds (0 = 01.01.1970 00:00:00,000 UTC+0).
public static HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase UnixMillisecond();Returns
Section titled “Returns”TimeBase
A new TimeBase instance with value 2.
TimeBase.UnixSecond() Method
Section titled “TimeBase.UnixSecond() Method”Creates a time base for unix seconds. The time is persisted in unix seconds (0 = 01.01.1970 00:00:00 UTC+0).
public static HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase UnixSecond();Returns
Section titled “Returns”TimeBase
A new TimeBase instance with value 1.
Operators
Section titled “Operators”TimeBase.operator ==(TimeBase, TimeBase) Operator
Section titled “TimeBase.operator ==(TimeBase, TimeBase) Operator”Compares the value of two time bases using the operator ‘==’.
public static bool operator ==(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase left, HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase right);Parameters
Section titled “Parameters”left TimeBase
The TimeBase on the left of the ‘==’ operator.
right TimeBase
The TimeBase on the right of the ‘==’ operator.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the time bases are equal (true) or not equal (false).
TimeBase.operator !=(TimeBase, TimeBase) Operator
Section titled “TimeBase.operator !=(TimeBase, TimeBase) Operator”Compares the value of two time bases using the operator ‘!=’.
public static bool operator !=(HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase left, HAKOM.TSM.Net.Api.Time.TimeBases.TimeBase right);Parameters
Section titled “Parameters”left TimeBase
The TimeBase on the left of the ‘!=’ operator.
right TimeBase
The TimeBase on the right of the ‘!=’ operator.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the time bases are not equal (true) or equal (false).