RangePartitionResolver<T> Constructors

Definition

Overloads

RangePartitionResolver<T>(Func<Object,Object>, IDictionary<Range<T>,String>)

Initializes a new instance of the HashPartitionResolver in the Azure Cosmos DB service using the specified partitionKeyExtractor value.

RangePartitionResolver<T>(String, IDictionary<Range<T>,String>)

Initializes a new instance of the RangePartitionResolver<T> class in the Azure Cosmos DB service using the specified partitionKeyPropertyName value.

RangePartitionResolver<T>(Func<Object,Object>, IDictionary<Range<T>,String>)

Initializes a new instance of the HashPartitionResolver in the Azure Cosmos DB service using the specified partitionKeyExtractor value.

public RangePartitionResolver (Func<object,object> partitionKeyExtractor, System.Collections.Generic.IDictionary<Microsoft.Azure.Documents.Partitioning.Range<T>,string> partitionMap);
new Microsoft.Azure.Documents.Partitioning.RangePartitionResolver<'T (requires 'T :> IComparable<'T> and 'T :> IEquatable<'T>)> : Func<obj, obj> * System.Collections.Generic.IDictionary<Microsoft.Azure.Documents.Partitioning.Range<'T>, string> -> Microsoft.Azure.Documents.Partitioning.RangePartitionResolver<'T (requires 'T :> IComparable<'T> and 'T :> IEquatable<'T>)>
Public Sub New (partitionKeyExtractor As Func(Of Object, Object), partitionMap As IDictionary(Of Range(Of T), String))

Parameters

partitionKeyExtractor
Func<Object,Object>

The name of the property in the document to execute the hashing on.

partitionMap
IDictionary<Range<T>,String>

A map from range to collection-link that is used for partitioning requests.

Exceptions

Thrown if one of the parameters is null.

Applies to

RangePartitionResolver<T>(String, IDictionary<Range<T>,String>)

Initializes a new instance of the RangePartitionResolver<T> class in the Azure Cosmos DB service using the specified partitionKeyPropertyName value.

public RangePartitionResolver (string partitionKeyPropertyName, System.Collections.Generic.IDictionary<Microsoft.Azure.Documents.Partitioning.Range<T>,string> partitionMap);
new Microsoft.Azure.Documents.Partitioning.RangePartitionResolver<'T (requires 'T :> IComparable<'T> and 'T :> IEquatable<'T>)> : string * System.Collections.Generic.IDictionary<Microsoft.Azure.Documents.Partitioning.Range<'T>, string> -> Microsoft.Azure.Documents.Partitioning.RangePartitionResolver<'T (requires 'T :> IComparable<'T> and 'T :> IEquatable<'T>)>
Public Sub New (partitionKeyPropertyName As String, partitionMap As IDictionary(Of Range(Of T), String))

Parameters

partitionKeyPropertyName
String

The name of the property in the document to execute the hashing on.

partitionMap
IDictionary<Range<T>,String>

A map from range to collection-link that is used for partitioning requests.

Exceptions

Thrown if one of the parameters is null.

Remarks

Use when you want to partition based on a single property name. For other partitioning schemes, use the constructor with partitionKeyExtractor instead.

Applies to