Range<T> Class

Definition

Caution

Support for classes used with IPartitionResolver is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput.

A class that represents a range used by the RangePartitionResolver class in the Azure Cosmos DB service.

[System.Obsolete("Support for classes used with IPartitionResolver is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput.")]
public class Range<T> : IComparable<Microsoft.Azure.Documents.Partitioning.Range<T>>, IEquatable<Microsoft.Azure.Documents.Partitioning.Range<T>> where T : IComparable<T>, IEquatable<T>
[<System.Obsolete("Support for classes used with IPartitionResolver is now obsolete. It's recommended that you use partitioned collections for higher storage and throughput.")>]
type Range<'T (requires 'T :> IComparable<'T> and 'T :> IEquatable<'T>)> = class
    interface IEquatable<Range<'T>>
    interface IComparable<Range<'T>>
Public Class Range(Of T)
Implements IComparable(Of Range(Of T)), IEquatable(Of Range(Of T))

Type Parameters

T

Any type that can be used for range comparison.

Inheritance
Range<T>
Attributes
Implements

Remarks

Support for classes used with IPartitionResolver is now obsolete. It's recommended that you use Partitioned Collections for higher storage and throughput.

Constructors

Range<T>(T)

Initializes a new instance of the Range<T> class for a single value.

Range<T>(T, T)

Initializes a new instance of the Range<T> class using the specified low and high values.

Properties

High

Gets the high value in the range.

Low

Gets the low value in the range.

Methods

CompareTo(Range<T>)

Compares two ranges.

Contains(Range<T>)

Checks if the range contains another range..

Contains(T)

Checks if the range contains a key.

Equals(Range<T>)

Checks if two ranges are equal.

GetHashCode()

Creates the hashcode for the range.

Intersect(Range<T>)

Checks if the range other intersects with this range.

ToString()

Converts the range to a string in the form of "low,high"

Applies to