Struct LambdaContext
Represents lambda construction context.
Implements
Inherited Members
Namespace: DotNext.Metaprogramming
Assembly: DotNext.Metaprogramming.dll
Syntax
public readonly 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
| Edit this page View Sourcethis[int]
Gets parameter of the lambda function.
Declaration
public ParameterExpression this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | 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
| Edit this page View SourceInvoke(params 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, params Expression[]) instead.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | This context is no longer available. |