Bearbeiten

Freigeben über


ImmutableSortedDictionary.CreateRange Method

Definition

Overloads

CreateRange<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)

Creates an immutable sorted dictionary that contains the specified items and uses the default comparer.

CreateRange<TKey,TValue>(IComparer<TKey>, IEnumerable<KeyValuePair<TKey,TValue>>)

Creates a new immutable sorted dictionary from the specified range of items with the specified key comparer.

CreateRange<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>, IEnumerable<KeyValuePair<TKey,TValue>>)

Creates a new immutable sorted dictionary from the specified range of items with the specified key and value comparers.

CreateRange<TKey,TValue>(IEnumerable<KeyValuePair<TKey,TValue>>)

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

Creates an immutable sorted dictionary that contains the specified items and uses the default comparer.

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ CreateRange(System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRange : seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function CreateRange(Of TKey, TValue) (items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

Type Parameters

TKey

The type of keys stored in the dictionary.

TValue

The type of values stored in the dictionary.

Parameters

items
IEnumerable<KeyValuePair<TKey,TValue>>

The items to add to the sorted dictionary before it's immutable.

Returns

An immutable sorted dictionary that contains the specified items.

Applies to

CreateRange<TKey,TValue>(IComparer<TKey>, IEnumerable<KeyValuePair<TKey,TValue>>)

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

Creates a new immutable sorted dictionary from the specified range of items with the specified key comparer.

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ CreateRange(System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey>? keyComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRange : System.Collections.Generic.IComparer<'Key> * seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function CreateRange(Of TKey, TValue) (keyComparer As IComparer(Of TKey), items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

Type Parameters

TKey

The type of keys stored in the dictionary.

TValue

The type of values stored in the dictionary.

Parameters

keyComparer
IComparer<TKey>

The comparer implementation to use to evaluate keys for equality and sorting.

items
IEnumerable<KeyValuePair<TKey,TValue>>

The items to add to the sorted dictionary.

Returns

The new immutable sorted dictionary that contains the specified items and uses the specified key comparer.

Applies to

CreateRange<TKey,TValue>(IComparer<TKey>, IEqualityComparer<TValue>, IEnumerable<KeyValuePair<TKey,TValue>>)

Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs
Source:
ImmutableSortedDictionary.cs

Creates a new immutable sorted dictionary from the specified range of items with the specified key and value comparers.

public:
generic <typename TKey, typename TValue>
 static System::Collections::Immutable::ImmutableSortedDictionary<TKey, TValue> ^ CreateRange(System::Collections::Generic::IComparer<TKey> ^ keyComparer, System::Collections::Generic::IEqualityComparer<TValue> ^ valueComparer, System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey> keyComparer, System.Collections.Generic.IEqualityComparer<TValue> valueComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
public static System.Collections.Immutable.ImmutableSortedDictionary<TKey,TValue> CreateRange<TKey,TValue> (System.Collections.Generic.IComparer<TKey>? keyComparer, System.Collections.Generic.IEqualityComparer<TValue>? valueComparer, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> items);
static member CreateRange : System.Collections.Generic.IComparer<'Key> * System.Collections.Generic.IEqualityComparer<'Value> * seq<System.Collections.Generic.KeyValuePair<'Key, 'Value>> -> System.Collections.Immutable.ImmutableSortedDictionary<'Key, 'Value>
Public Function CreateRange(Of TKey, TValue) (keyComparer As IComparer(Of TKey), valueComparer As IEqualityComparer(Of TValue), items As IEnumerable(Of KeyValuePair(Of TKey, TValue))) As ImmutableSortedDictionary(Of TKey, TValue)

Type Parameters

TKey

The type of keys stored in the dictionary.

TValue

The type of values stored in the dictionary.

Parameters

keyComparer
IComparer<TKey>

The comparer implementation to use to compare keys for equality and sorting.

valueComparer
IEqualityComparer<TValue>

The comparer implementation to use to compare values for equality.

items
IEnumerable<KeyValuePair<TKey,TValue>>

The items to add to the sorted dictionary before it's immutable.

Returns

An immutable sorted dictionary that contains the specified items and uses the specified comparers.

Applies to