Struct LambdaContext
Represents lambda construction context.
Implements
Inherited Members
Namespace: DotNext.Metaprogramming
Assembly: DotNext.Metaprogramming.dll
Syntax
public struct LambdaContext : IReadOnlyList<ParameterExpression>, IReadOnlyCollection<ParameterExpression>, IEnumerable<ParameterExpression>, IEnumerable, IDisposable
Remarks
The context lifetime is limited by surrounding lexical scope of the lambda function.
Properties
| Improve this Doc View SourceItem[Int32]
Gets parameter of the lambda function.
Declaration
public ParameterExpression this[int index] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | The index of the parameter. |
Property Value
| Type | Description |
|---|---|
| ParameterExpression | The parameter of lambda function. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Methods
| Improve this Doc View SourceDeconstruct(out ParameterExpression, out ParameterExpression)
Obtains first two arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first three arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first four arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first five arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4, out ParameterExpression arg5)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
| ParameterExpression | arg5 | The expression representing the fifth argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first six arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4, out ParameterExpression arg5, out ParameterExpression arg6)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
| ParameterExpression | arg5 | The expression representing the fifth argument. |
| ParameterExpression | arg6 | The expression representing the sixth argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first seven arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4, out ParameterExpression arg5, out ParameterExpression arg6, out ParameterExpression arg7)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
| ParameterExpression | arg5 | The expression representing the fifth argument. |
| ParameterExpression | arg6 | The expression representing the sixth argument. |
| ParameterExpression | arg7 | The expression representing the seventh argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first eight arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4, out ParameterExpression arg5, out ParameterExpression arg6, out ParameterExpression arg7, out ParameterExpression arg8)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
| ParameterExpression | arg5 | The expression representing the fifth argument. |
| ParameterExpression | arg6 | The expression representing the sixth argument. |
| ParameterExpression | arg7 | The expression representing the seventh argument. |
| ParameterExpression | arg8 | The expression representing the eighth argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first nine arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4, out ParameterExpression arg5, out ParameterExpression arg6, out ParameterExpression arg7, out ParameterExpression arg8, out ParameterExpression arg9)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
| ParameterExpression | arg5 | The expression representing the fifth argument. |
| ParameterExpression | arg6 | The expression representing the sixth argument. |
| ParameterExpression | arg7 | The expression representing the seventh argument. |
| ParameterExpression | arg8 | The expression representing the eighth argument. |
| ParameterExpression | arg9 | The expression representing the ninth argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Deconstruct(out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression, out ParameterExpression)
Obtains first ten arguments in the form of expressions.
Declaration
public void Deconstruct(out ParameterExpression arg1, out ParameterExpression arg2, out ParameterExpression arg3, out ParameterExpression arg4, out ParameterExpression arg5, out ParameterExpression arg6, out ParameterExpression arg7, out ParameterExpression arg8, out ParameterExpression arg9, out ParameterExpression arg10)
Parameters
| Type | Name | Description |
|---|---|---|
| ParameterExpression | arg1 | The expression representing the first argument. |
| ParameterExpression | arg2 | The expression representing the second argument. |
| ParameterExpression | arg3 | The expression representing the third argument. |
| ParameterExpression | arg4 | The expression representing the fourth argument. |
| ParameterExpression | arg5 | The expression representing the fifth argument. |
| ParameterExpression | arg6 | The expression representing the sixth argument. |
| ParameterExpression | arg7 | The expression representing the seventh argument. |
| ParameterExpression | arg8 | The expression representing the eighth argument. |
| ParameterExpression | arg9 | The expression representing the ninth argument. |
| ParameterExpression | arg10 | The expression representing the tenth argument. |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Invoke(Expression[])
Invokes function recursively.
Declaration
public InvocationExpression Invoke(params Expression[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression[] | args | The arguments to be passed into function. |
Returns
| Type | Description |
|---|---|
| InvocationExpression | The invocation expression. |
Remarks
This method doesn't add invocation expression as a statement. To add recursive call as statement, use Invoke(Expression, Expression[]) instead.
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This context is no longer available. |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable<ParameterExpression>.GetEnumerator()
Declaration
IEnumerator<ParameterExpression> IEnumerable<ParameterExpression>.GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<ParameterExpression> |
IReadOnlyCollection<ParameterExpression>.Count
Declaration
int IReadOnlyCollection<ParameterExpression>.Count { get; }
Returns
| Type | Description |
|---|---|
| Int32 |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator |
IDisposable.Dispose()
Declaration
void IDisposable.Dispose()