10 [DebuggerTypeProxy(typeof(BlockExpressionProxy))]
11 [global::__DynamicallyInvokable]
16 [global::__DynamicallyInvokable]
19 [global::__DynamicallyInvokable]
22 return GetOrMakeExpressions();
28 [global::__DynamicallyInvokable]
31 [global::__DynamicallyInvokable]
34 return GetOrMakeVariables();
40 [global::__DynamicallyInvokable]
43 [global::__DynamicallyInvokable]
46 return GetExpression(ExpressionCount - 1);
52 [global::__DynamicallyInvokable]
55 [global::__DynamicallyInvokable]
64 [global::__DynamicallyInvokable]
67 [global::__DynamicallyInvokable]
70 return GetExpression(ExpressionCount - 1).Type;
74 internal virtual int ExpressionCount
78 throw ContractUtils.Unreachable;
82 internal virtual int VariableCount => 0;
84 internal BlockExpression()
91 [global::__DynamicallyInvokable]
101 [global::__DynamicallyInvokable]
111 internal virtual Expression GetExpression(
int index)
113 throw ContractUtils.Unreachable;
118 throw ContractUtils.Unreachable;
121 internal virtual ParameterExpression GetVariable(
int index)
123 throw ContractUtils.Unreachable;
128 return EmptyReadOnlyCollection<ParameterExpression>.Instance;
133 throw ContractUtils.Unreachable;
138 Expression expression = collection as Expression;
139 if (expression !=
null)
Provides the base class for a generic read-only collection.
Represents a block that contains a sequence of expressions where variables can be defined.
Exposes the enumerator, which supports a simple iteration over a collection of a specified type....
Provides the base class from which the classes that represent expression tree nodes are derived....
static int CompareExchange(ref int location1, int value, int comparand)
Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.
ReadOnlyCollection< Expression > Expressions
Gets the expressions in this block.
Represents type declarations: class types, interface types, array types, value types,...
ExpressionType
Describes the node types for the nodes of an expression tree.
internal override Expression Accept(ExpressionVisitor visitor)
Dispatches to the specific visit method for this node type. For example, T:System....
virtual internal Expression VisitBlock(BlockExpression node)
Visits the children of the T:System.Linq.Expressions.BlockExpression.
BlockExpression Update(IEnumerable< ParameterExpression > variables, IEnumerable< Expression > expressions)
Creates a new expression that is like this one, but using the supplied children. If all of the childr...
ReadOnlyCollection< ParameterExpression > Variables
Gets the variables defined in this block.
Expression Result
Gets the last expression in this block.
Provides atomic operations for variables that are shared by multiple threads.
sealed override ExpressionType NodeType
Returns the node type of this expression. Extension nodes should return F:System.Linq....
Represents a visitor or rewriter for expression trees.