Class MutationExpression
Represents record mutation expression.
Inherited Members
Namespace: DotNext.Linq.Expressions
Assembly: DotNext.Metaprogramming.dll
Syntax
public sealed class MutationExpression : CustomExpression
Properties
| Edit this page View SourceBindings
Gets mutation expressions.
Declaration
public IReadOnlyList<MemberAssignment> Bindings { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<MemberAssignment> |
Expression
Gets the object to copy.
Declaration
public Expression Expression { get; }
Property Value
| Type | Description |
|---|---|
| Expression |
Type
Gets type of this expression.
Declaration
public override Type Type { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Overrides
Methods
| Edit this page View SourceCreate(Expression, MemberBindings)
Creates an expression equivalent to with operator in C#.
Declaration
public static MutationExpression Create(Expression target, MemberBindings bindings)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression | target | The left operand. |
| MemberBindings | bindings | The initialization list. |
Returns
| Type | Description |
|---|---|
| MutationExpression | A new object representing mutation expression. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Create(Expression, IReadOnlyList<MemberAssignment>)
Creates an expression equivalent to with operator in C#.
Declaration
public static MutationExpression Create(Expression target, IReadOnlyList<MemberAssignment> bindings)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression | target | The left operand. |
| IReadOnlyList<MemberAssignment> | bindings | The initialization list. |
Returns
| Type | Description |
|---|---|
| MutationExpression | A new object representing mutation expression. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Reduce()
Translates this expression into predefined set of expressions using Lowering technique.
Declaration
public override Expression Reduce()
Returns
| Type | Description |
|---|---|
| Expression | Translated expression. |
Overrides
| Edit this page View SourceVisitChildren(ExpressionVisitor)
Visit children expressions.
Declaration
protected override MutationExpression VisitChildren(ExpressionVisitor visitor)
Parameters
| Type | Name | Description |
|---|---|---|
| ExpressionVisitor | visitor | Expression visitor. |
Returns
| Type | Description |
|---|---|
| MutationExpression | Potentially modified expression if one of children expressions is modified during visit. |