Search Results for

    Show / Hide Table of Contents

    Class Time

    Represents a time value

    Inheritance
    object
    Time
    Implements
    IComparable<Time>
    IEquatable<Time>
    IUrlParameter
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: OpenSearch.Client
    Assembly: OpenSearch.Client.dll
    Syntax
    public class Time : IComparable<Time>, IEquatable<Time>, IUrlParameter

    Constructors

    | Edit this page View Source

    Time(double)

    Declaration
    public Time(double milliseconds)
    Parameters
    Type Name Description
    double milliseconds
    | Edit this page View Source

    Time(double, TimeUnit)

    Declaration
    public Time(double factor, TimeUnit interval)
    Parameters
    Type Name Description
    double factor
    TimeUnit interval
    | Edit this page View Source

    Time(string)

    Declaration
    public Time(string timeUnit)
    Parameters
    Type Name Description
    string timeUnit
    | Edit this page View Source

    Time(TimeSpan)

    Declaration
    public Time(TimeSpan timeSpan)
    Parameters
    Type Name Description
    TimeSpan timeSpan

    Properties

    | Edit this page View Source

    Factor

    Declaration
    public double? Factor { get; }
    Property Value
    Type Description
    double?
    | Edit this page View Source

    Interval

    Declaration
    public TimeUnit? Interval { get; }
    Property Value
    Type Description
    TimeUnit?
    | Edit this page View Source

    Milliseconds

    Declaration
    public double? Milliseconds { get; }
    Property Value
    Type Description
    double?
    | Edit this page View Source

    MinusOne

    Declaration
    public static Time MinusOne { get; }
    Property Value
    Type Description
    Time
    | Edit this page View Source

    Zero

    Declaration
    public static Time Zero { get; }
    Property Value
    Type Description
    Time

    Methods

    | Edit this page View Source

    CompareTo(Time)

    Declaration
    public int CompareTo(Time other)
    Parameters
    Type Name Description
    Time other
    Returns
    Type Description
    int
    | Edit this page View Source

    Equals(Time)

    Declaration
    public bool Equals(Time other)
    Parameters
    Type Name Description
    Time other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page View Source

    ToTimeSpan()

    Converts this instance of Time to an instance of TimeSpan. For values in Microseconds and Nanoseconds, value will be rounded to the nearest Tick. All other values will be rounded to the nearest Millisecond.

    Declaration
    public TimeSpan ToTimeSpan()
    Returns
    Type Description
    TimeSpan
    Exceptions
    Type Condition
    InvalidOperationException

    special time values MinusOne and Zero do not have a TimeSpan representation.

    instance of Time has no value for Interval

    Operators

    | Edit this page View Source

    operator ==(Time, Time)

    Declaration
    public static bool operator ==(Time left, Time right)
    Parameters
    Type Name Description
    Time left
    Time right
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator >(Time, Time)

    Declaration
    public static bool operator >(Time left, Time right)
    Parameters
    Type Name Description
    Time left
    Time right
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator >=(Time, Time)

    Declaration
    public static bool operator >=(Time left, Time right)
    Parameters
    Type Name Description
    Time left
    Time right
    Returns
    Type Description
    bool
    | Edit this page View Source

    implicit operator Time(double)

    Declaration
    public static implicit operator Time(double milliseconds)
    Parameters
    Type Name Description
    double milliseconds
    Returns
    Type Description
    Time
    | Edit this page View Source

    implicit operator Time(string)

    Declaration
    public static implicit operator Time(string expression)
    Parameters
    Type Name Description
    string expression
    Returns
    Type Description
    Time
    | Edit this page View Source

    implicit operator Time(TimeSpan)

    Declaration
    public static implicit operator Time(TimeSpan span)
    Parameters
    Type Name Description
    TimeSpan span
    Returns
    Type Description
    Time
    | Edit this page View Source

    operator !=(Time, Time)

    Declaration
    public static bool operator !=(Time left, Time right)
    Parameters
    Type Name Description
    Time left
    Time right
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator <(Time, Time)

    Declaration
    public static bool operator <(Time left, Time right)
    Parameters
    Type Name Description
    Time left
    Time right
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator <=(Time, Time)

    Declaration
    public static bool operator <=(Time left, Time right)
    Parameters
    Type Name Description
    Time left
    Time right
    Returns
    Type Description
    bool

    Implements

    IComparable<T>
    IEquatable<T>
    IUrlParameter

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Constructors
      • Time(double)
      • Time(double, TimeUnit)
      • Time(string)
      • Time(TimeSpan)
    • Properties
      • Factor
      • Interval
      • Milliseconds
      • MinusOne
      • Zero
    • Methods
      • CompareTo(Time)
      • Equals(Time)
      • Equals(object)
      • GetHashCode()
      • ToString()
      • ToTimeSpan()
    • Operators
      • operator ==(Time, Time)
      • operator >(Time, Time)
      • operator >=(Time, Time)
      • implicit operator Time(double)
      • implicit operator Time(string)
      • implicit operator Time(TimeSpan)
      • operator !=(Time, Time)
      • operator <(Time, Time)
      • operator <=(Time, Time)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX