Struct DateRangeBound
Represents a date range boundary, composed by a Date
and a precision.
Implements
IEquatable<DateRangeBound>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
Namespace: Cassandra.DataStax.Search
Assembly: Cassandra.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 |
---|---|---|
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 |
---|---|
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 |
---|---|
bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
System.ValueType.Equals(object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
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 |
---|---|---|
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 |
---|---|
string |
Overrides
System.ValueType.ToString()
Operators
operator ==(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 |
---|---|
bool |
operator !=(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 |
---|---|
bool |
Implements
System.IEquatable<T>