Class SwitchCaseSlim
Lightweight representation of one case of a SwitchExpressionSlim.
Inheritance
System.Object
SwitchCaseSlim
Namespace: System.Linq.Expressions
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public sealed class SwitchCaseSlim : Object
Properties
Body
Gets the body of this case.
Declaration
public ExpressionSlim Body { get; }
Property Value
Type | Description |
---|---|
ExpressionSlim |
TestValues
Gets the values of this case. This case is selected for execution when the SwitchValue matches any of these values.
Declaration
public ReadOnlyCollection<ExpressionSlim> TestValues { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ExpressionSlim> |
Methods
Update(ReadOnlyCollection<ExpressionSlim>, ExpressionSlim)
Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
Declaration
public SwitchCaseSlim Update(ReadOnlyCollection<ExpressionSlim> testValues, ExpressionSlim body)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.ReadOnlyCollection<ExpressionSlim> | testValues | The TestValues property of the result. |
ExpressionSlim | body | The Body property of the result. |
Returns
Type | Description |
---|---|
SwitchCaseSlim | This expression if no children changed, or an expression with the updated children. |