Struct CollectionSink<T>
- Namespace
- Jitter2.DataStructures
- Assembly
- Jitter2.dll
Adapts an ICollection<T> to the ISink<T> interface.
public readonly struct CollectionSink<T> : ISink<T>
Type Parameters
TThe element type.
- Implements
-
ISink<T>
- Inherited Members
Constructors
CollectionSink(ICollection<T>)
Creates a sink that forwards to the specified collection.
public CollectionSink(ICollection<T> collection)
Parameters
collectionICollection<T>
Exceptions
- ArgumentNullException
Thrown when
collectionis null.
Methods
Add(in T)
Appends a value to the wrapped collection.
public void Add(in T item)
Parameters
itemT