mscorlib(4.0.0.0) API with additions
SwitchCase.cs
3 using System.Diagnostics;
4 
6 {
8  [DebuggerTypeProxy(typeof(Expression.SwitchCaseProxy))]
9  [global::__DynamicallyInvokable]
10  public sealed class SwitchCase
11  {
12  private readonly ReadOnlyCollection<Expression> _testValues;
13 
14  private readonly Expression _body;
15 
18  [global::__DynamicallyInvokable]
20  {
21  [global::__DynamicallyInvokable]
22  get
23  {
24  return _testValues;
25  }
26  }
27 
30  [global::__DynamicallyInvokable]
31  public Expression Body
32  {
33  [global::__DynamicallyInvokable]
34  get
35  {
36  return _body;
37  }
38  }
39 
40  internal SwitchCase(Expression body, ReadOnlyCollection<Expression> testValues)
41  {
42  _body = body;
43  _testValues = testValues;
44  }
45 
48  [global::__DynamicallyInvokable]
49  public override string ToString()
50  {
51  return ExpressionStringBuilder.SwitchCaseToString(this);
52  }
53 
58  [global::__DynamicallyInvokable]
60  {
61  if (testValues == TestValues && body == Body)
62  {
63  return this;
64  }
65  return Expression.SwitchCase(body, testValues);
66  }
67  }
68 }
Provides the base class for a generic read-only collection.
Definition: __Canon.cs:3
Exposes the enumerator, which supports a simple iteration over a collection of a specified type....
Definition: IEnumerable.cs:9
Provides the base class from which the classes that represent expression tree nodes are derived....
Definition: Expression.cs:17
Represents one case of a T:System.Linq.Expressions.SwitchExpression.
Definition: SwitchCase.cs:10
override string ToString()
Returns a T:System.String that represents the current T:System.Object.
Definition: SwitchCase.cs:49
SwitchCase Update(IEnumerable< Expression > testValues, Expression body)
Creates a new expression that is like this one, but using the supplied children. If all of the childr...
Definition: SwitchCase.cs:59
Expression Body
Gets the body of this case.
Definition: SwitchCase.cs:32
ReadOnlyCollection< Expression > TestValues
Gets the values of this case. This case is selected for execution when the P:System....
Definition: SwitchCase.cs:20