RangePartitionResolver<T> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
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 |
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
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
Azure SDK for .NET