Redigera

Dela via


CollectionsExtensions Class

Definition

Extension methods for .Net Collection objects, e.g. Lists, Dictionaries, Arrays

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

Methods

AsReadOnly<TElement>(IList<TElement>)

Creates a read-only wrapper around an existing collection.

DisposeElements<TElement>(IEnumerable<TElement>)

Disposes of all non-null elements in a collection.

DisposeElements<TElement>(IList<TElement>)

Disposes of all non-null elements in a collection.

ExportDictionaryValuesAsArray<T>(Dictionary<UInt32,T>)

Exports the values of a uint indexed Dictionary as an Array

GetInteractionByType(MixedRealityInteractionMapping[], DeviceInputType)

Overload extension to enable getting of an InteractionDefinition of a specific type

SortedInsert<TElement>(List<TElement>, TElement, IComparer<TElement>)

Inserts an item in its sorted position into an already sorted collection. This is useful if you need to consume the collection in between insertions and need it to stay correctly sorted the whole time. If you just need to insert a bunch of items and then consume the sorted collection at the end, it's faster to add all the elements and then use Sort() at the end.

SupportsInputType(MixedRealityInteractionMapping[], DeviceInputType)

Overload extension to enable getting of an InteractionDefinition of a specific type

ToReadOnlyCollection<TElement>(IEnumerable<TElement>)

Creates a read-only copy of an existing collection.

Applies to