Struct DateRangeBound
Represents a date range boundary, composed by a Date
and a precision.
Implements
System.IEquatable<DateRangeBound>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Dse.Search
Assembly: Dse.dll
Syntax
public struct DateRangeBound : IEquatable<DateRangeBound>
Remarks
DateRangeBound instances are immutable and thread-safe.
Constructors
DateRangeBound(DateTimeOffset, DateRangePrecision)
Creates a new instance of DateRangeBound.
Declaration
public DateRangeBound(DateTimeOffset timestamp, DateRangePrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.DateTimeOffset | timestamp | |
DateRangePrecision | precision |
Fields
Unbounded
The unbounded DateRangeBound instance. Unbounded bounds are syntactically
represented by a *
(star) sign.
Declaration
public static readonly DateRangeBound Unbounded
Field Value
Type | Description |
---|---|
DateRangeBound |
Properties
Precision
The precision portion of the boundary.
Declaration
public DateRangePrecision Precision { get; }
Property Value
Type | Description |
---|---|
DateRangePrecision |
Timestamp
The timestamp portion of the boundary.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
System.DateTimeOffset |
Methods
Equals(DateRangeBound)
Returns true if the value of this instance and other are the same.
Declaration
public bool Equals(DateRangeBound other)
Parameters
Type | Name | Description |
---|---|---|
DateRangeBound | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.ValueType.GetHashCode()
Parse(String)
Returns the DateRangeBound representation of a given string.
String representations of dates are always expressed in Coordinated Universal Time(UTC)
Declaration
public static DateRangeBound Parse(string boundaryString)
Parameters
Type | Name | Description |
---|---|---|
System.String | boundaryString |
Returns
Type | Description |
---|---|
DateRangeBound |
Exceptions
Type | Condition |
---|---|
System.FormatException |
ToString()
Returns the string representation of the instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.ValueType.ToString()
Operators
Equality(DateRangeBound, DateRangeBound)
Compares value equality of 2 DateRangeBound instances.
Declaration
public static bool operator ==(DateRangeBound a, DateRangeBound b)
Parameters
Type | Name | Description |
---|---|---|
DateRangeBound | a | |
DateRangeBound | b |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(DateRangeBound, DateRangeBound)
Compares value inequality of 2 DateRangeBound instances.
Declaration
public static bool operator !=(DateRangeBound a, DateRangeBound b)
Parameters
Type | Name | Description |
---|---|---|
DateRangeBound | a | |
DateRangeBound | b |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IEquatable<T>