Class ToDictionary
Represents an operator that creates a dictionary from an observable sequence according to the specified key and element selector.
ToDictionary
collects all the values from the source sequence and creates a dictionary mapping keys to elements using the specified KeySelector and ElementSelector properties. The dictionary is emitted when the source sequence completes successfully, and will have key and element types matching the selected members.
Warning
If the source sequence emits a value with a duplicate key, an error will be raised and the sequence will terminate exceptionally.
Warning
If the source sequence is infinite (i.e. does not terminate), this operator will never emit the collection, and will keep accumulating all elements from the source sequence indefinitely, with likely impacts on available memory.
public class ToDictionary : SingleArgumentExpressionBuilder, IExpressionBuilder
- Inheritance
-
ToDictionary
- Implements
- Inherited Members
- Extension Methods
Properties
- ElementSelector
Gets or sets a value specifying the inner properties used as elements in the dictionary.
- KeySelector
Gets or sets a value specifying the inner properties used as keys in the dictionary.
Methods
- Build(IEnumerable<Expression>)
Constructs an Expression node from a collection of input arguments. The result can be chained with other builders in a workflow.