template class ARDKReadOnlyCollection (Niantic.ARDK.Utilities.Collections.ARDKReadOnlyCollection)
Overview
Helper class to create new ARDKReadOnlyCollection<T> instances by using type-inference. That is: var readOnlySet = hashSet.AsArdkReadOnly(); More…
template <T> class ARDKReadOnlyCollection: IReadOnlyCollection< T >, ICollection< T > { public: // properties int Count; // methods static ARDKReadOnlyCollection<T> AsArdkReadOnly< T >(this ICollection<T> mutableCollection); ARDKReadOnlyCollection(ICollection<T> mutableCollection); bool Contains(T item); void CopyTo(T[] array, int arrayIndex); IEnumerator<T> GetEnumerator(); };
Detailed Documentation
Helper class to create new ARDKReadOnlyCollection<T> instances by using type-inference. That is: var readOnlySet = hashSet.AsArdkReadOnly();
Represents a read-only accessor to a mutable collection, similar to what ReadOnlyCollection does to lists and arrays, but being just a “collection” (the .NET ReadOnlyCollection should be named ReadOnlyList). Instances of this class cannot modify the collection they point to, yet the original collection can still be modified by anyone having a reference to it (and any changes will be visible by instances of this class).
This class implements the mutable ICollection<T> (but throws on any mutation method) to support the fast LINQ operations. LINQ cast only to the mutable interfaces, not to the read-only ones.