Show / Hide Table of Contents

    Struct Timestamp

    Represents a timestamp.

    Представляет метку времени.

    Implements
    IEquatable<Timestamp>
    Inherited Members
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: Platform.Timestamps
    Assembly: Platform.Timestamps.dll
    Syntax
    public struct Timestamp : IEquatable<Timestamp>
    Remarks

    To make this timestamp truly unique, it is recommended to use UniqueTimestampFactory.

    Чтобы эта метка времени была действительно уникальна рекомендуется использовать UniqueTimestampFactory.

    Constructors

    | Improve this Doc View Source

    Timestamp(UInt64)

    Creates a timestamp.

    Создаёт метку времени.

    Declaration
    public Timestamp(ulong ticks)
    Parameters
    Type Name Description
    UInt64 ticks

    A number representing the number of ticks.

    Число представляющие количество тиков.

    Fields

    | Improve this Doc View Source

    DefaultFormat

    Returns a string containing the default DateTime format for Timestamp.

    Возвращает строку, содержащую формат даты и времени по умолчанию для метки времени.

    Declaration
    public static readonly string DefaultFormat
    Field Value
    Type Description
    String
    | Improve this Doc View Source

    Ticks

    Gets or sets the number of ticks that represent the date and time in UTC.

    Возвращает или устанавливает количество тиков, которые представляют дату и время в UTC.

    Declaration
    public readonly ulong Ticks
    Field Value
    Type Description
    UInt64

    Methods

    | Improve this Doc View Source

    Equals(Timestamp)

    Определяет, равна ли текущая отметка времени другой отметке времени.

    Indicates whether the current Timestamp is equal to another Timestamp.

    Declaration
    public bool Equals(Timestamp other)
    Parameters
    Type Name Description
    Timestamp other

    Other Timestamp.

    Другая отметка времени.

    Returns
    Type Description
    Boolean

    True if the current Timestamp is equal to the other Timestamp; otherwise, false.

    Истину, если текущая отметка времени равна другой отметке времени; иначе ложь.

    | Improve this Doc View Source

    Equals(Object)

    Determines whether the specified object is equal to the current object.

    Определяет, равен ли указанный объект текущему объекту.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare with the current object.

    Объект для сравнения с текущим объектом.

    Returns
    Type Description
    Boolean

    True if the specified object is equal to the current object; otherwise, false.

    Истину, если указанный объект равен текущему объекту; иначе ложь.

    Overrides
    ValueType.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Serves as the default hash function.

    Служит в качестве хэш-функции по умолчанию.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for the current object.

    Хеш-код для текущего объекта.

    Overrides
    ValueType.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Returns a string that represents the current Timestamp.

    Возвращает строку, которая представляет текущую метку времени.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the current Timestamp.

    Строка, представляющая текущую метку времени.

    Overrides
    ValueType.ToString()

    Operators

    | Improve this Doc View Source

    Equality(Timestamp, Timestamp)

    Determines if the specified timestamp is equal to the current timestamp.

    Определяет, равна ли указанная метка времени текущей метке времени.

    Declaration
    public static bool operator ==(Timestamp left, Timestamp right)
    Parameters
    Type Name Description
    Timestamp left

    The current timestamp.

    Текущая метка времени.

    Timestamp right

    A timestamp to compare with this timestamp.

    Метка времени для сравнения с этой меткой времени.

    Returns
    Type Description
    Boolean

    True if the current timestamp is equal to the other timestamp; otherwise, false.

    True, если текущий метка времени равна другой метке времени; иначе false.

    | Improve this Doc View Source

    Implicit(Timestamp to DateTime)

    Defines an implicit conversion of a Timestamp to a DateTime.

    Определяет неявное преобразование метки времени в DateTime.

    Declaration
    public static implicit operator DateTime(Timestamp timestamp)
    Parameters
    Type Name Description
    Timestamp timestamp

    The Timestamp.

    Отметка времени.

    Returns
    Type Description
    DateTime
    | Improve this Doc View Source

    Implicit(Timestamp to UInt64)

    Defines an implicit conversion of a Timestamp to a 64-bit unsigned integer.

    Определяет неявное преобразование метки времени в 64-разрядное целое число без знака.

    Declaration
    public static implicit operator ulong (Timestamp timestamp)
    Parameters
    Type Name Description
    Timestamp timestamp

    The Timestamp.

    Отметка времени.

    Returns
    Type Description
    UInt64
    | Improve this Doc View Source

    Implicit(DateTime to Timestamp)

    Defines an implicit conversion of a DateTime to a Timestamp.

    Определяет неявное преобразование DateTime в метку времени.

    Declaration
    public static implicit operator Timestamp(DateTime dateTime)
    Parameters
    Type Name Description
    DateTime dateTime

    The DateTime struct.

    Структура DateTime.

    Returns
    Type Description
    Timestamp
    | Improve this Doc View Source

    Implicit(UInt64 to Timestamp)

    Defines an implicit conversion of a 64-bit unsigned integer to a Timestamp.

    Определяет неявное преобразование 64-разрядного целого числа без знака в метку времени.

    Declaration
    public static implicit operator Timestamp(ulong ticks)
    Parameters
    Type Name Description
    UInt64 ticks

    The number of ticks represented as a 64-bit integer.

    Количество тиков представленное в виде 64-разрядного целого числа.

    Returns
    Type Description
    Timestamp
    | Improve this Doc View Source

    Inequality(Timestamp, Timestamp)

    Determines if the specified timestamp is not equal to the current timestamp.

    Определяет, не равна ли указанная метка времени текущей метке времени.

    Declaration
    public static bool operator !=(Timestamp left, Timestamp right)
    Parameters
    Type Name Description
    Timestamp left

    The current timestamp.

    Текущая метка времени.

    Timestamp right

    A timestamp to compare with this timestamp.

    Метка времени для сравнения с этой меткой времени.

    Returns
    Type Description
    Boolean

    True if the current timestamp is not equal to the other timestamp; otherwise, false.

    True, если текущий метка времени не равна другой метке времени; иначе false.

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX