CollectionExtensions Class

Definition

Provides extension methods for generic collections.

public ref class CollectionExtensions abstract sealed
public static class CollectionExtensions
type CollectionExtensions = class
Public Module CollectionExtensions
Inheritance
CollectionExtensions

Methods

AsReadOnly<T>(IList<T>)

Returns a read-only ReadOnlyCollection<T> wrapper for the specified list.

AsReadOnly<TKey,TValue>(IDictionary<TKey,TValue>)

Returns a read-only ReadOnlyDictionary<TKey,TValue> wrapper for the current dictionary.

GetDefaultAssets(IEnumerable<RuntimeAssetGroup>)

Gets an enumeration of assets where each asset has an empty runtime.

GetDefaultGroup(IEnumerable<RuntimeAssetGroup>)

Gets the first RuntimeAssetGroup with an empty Runtime.

GetDefaultRuntimeFileAssets(IEnumerable<RuntimeAssetGroup>)

Gets an enumeration of RuntimeFile where each value has an empty runtime.

GetRuntimeAssets(IEnumerable<RuntimeAssetGroup>, String)

Gets an enumeration of assets where each asset's value equals runtime.

GetRuntimeFileAssets(IEnumerable<RuntimeAssetGroup>, String)

Gets an enumeration of RuntimeFile where each value's Runtime equals runtime.

GetRuntimeGroup(IEnumerable<RuntimeAssetGroup>, String)

Gets the first RuntimeAssetGroup where Runtime matches runtime.

GetValueOrDefault<TKey,TValue>(IReadOnlyDictionary<TKey,TValue>, TKey)

Tries to get the value associated with the specified key in the dictionary.

GetValueOrDefault<TKey,TValue>(IReadOnlyDictionary<TKey,TValue>, TKey, TValue)

Tries to get the value associated with the specified key in the dictionary.

Remove<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

Tries to remove the value with the specified key from the dictionary.

TryAdd<TKey,TValue>(IDictionary<TKey,TValue>, TKey, TValue)

Tries to add the specified key and value to the dictionary.

Applies to