Class MappedItems<TResult>
- Namespace
- SodaFlow.Collections
- Assembly
- SodaFlow.Core.Collections.dll
The result of a projection across a collection: the projected objects, and the path to release them.
[PublicAPI]
public sealed class MappedItems<TResult> : IDisposable
Type Parameters
TResultWhat each key is projected to.
- Inheritance
-
MappedItems<TResult>
- Implements
- Inherited Members
- Extension Methods
Remarks
This is the shape of MapAsync. A projection continues after each
version of its input, thus other code must release it and a GC cannot
collect it. An object in a projection can hold resources, and the
callback that releases one object at an eviction does not run for the
objects that the projection holds at its end.
Bind to Items, and put this object with the other resources of the caller.
This is a class, as the status of MapAsync is. A copy of it is
the same projection and not a second handle to dispose, and no default
value exists whose disposal throws.
Properties
- Items
One object per key, in the collection's order.
Methods
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.