Class ValueTupleBuilder
Represents value tuple builder with arbitrary number of tuple items.
Inherited Members
Namespace: DotNext.Runtime.CompilerServices
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class ValueTupleBuilder : Disposable, IDisposable, IEnumerable<Type>, IEnumerable
Properties
| Edit this page View SourceCount
Number of elements in the tuple.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceAdd(Type)
Adds a new component into tuple.
Declaration
public void Add(Type itemType)
Parameters
Type | Name | Description |
---|---|---|
Type | itemType | The type of the tuple component. |
Add<T>()
Adds a new component into tuple.
Declaration
public void Add<T>()
Type Parameters
Name | Description |
---|---|
T | The type of the tuple component. |
Build()
Constructs value tuple.
Declaration
public Type Build()
Returns
Type | Description |
---|---|
Type | Value tuple. |
Build<TExpression>(Func<Type, TExpression>, out TExpression)
Constructs expression tree based on value tuple type.
Declaration
public MemberExpression[] Build<TExpression>(Func<Type, TExpression> expressionFactory, out TExpression expression) where TExpression : Expression
Parameters
Type | Name | Description |
---|---|---|
Func<Type, TExpression> | expressionFactory | A function accepting value tuple type and returning expression tree. |
TExpression | expression | Constructed expression. |
Returns
Type | Description |
---|---|
MemberExpression[] | Sorted array of value tuple type components. |
Type Parameters
Name | Description |
---|---|
TExpression | Type of expression tree. |
Dispose(bool)
Releases all managed resources associated with this builder.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
| Edit this page View SourceGetEnumerator()
Returns an enumerator over all tuple components.
Declaration
public IEnumerator<Type> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<Type> | An enumerator over all tuple components. |
Implements
Extension Methods
Collection.ForEachAsync<T>(IEnumerable<T>, Func<T, CancellationToken, ValueTask>, CancellationToken)
See Also
()