mscorlib(4.0.0.0) API with additions
GotoExpression.cs
1 using System.Diagnostics;
2 
4 {
6  [DebuggerTypeProxy(typeof(GotoExpressionProxy))]
7  [global::__DynamicallyInvokable]
8  public sealed class GotoExpression : Expression
9  {
10  private readonly GotoExpressionKind _kind;
11 
12  private readonly Expression _value;
13 
14  private readonly LabelTarget _target;
15 
16  private readonly Type _type;
17 
20  [global::__DynamicallyInvokable]
21  public sealed override Type Type
22  {
23  [global::__DynamicallyInvokable]
24  get
25  {
26  return _type;
27  }
28  }
29 
32  [global::__DynamicallyInvokable]
33  public sealed override ExpressionType NodeType
34  {
35  [global::__DynamicallyInvokable]
36  get
37  {
38  return ExpressionType.Goto;
39  }
40  }
41 
44  [global::__DynamicallyInvokable]
45  public Expression Value
46  {
47  [global::__DynamicallyInvokable]
48  get
49  {
50  return _value;
51  }
52  }
53 
56  [global::__DynamicallyInvokable]
57  public LabelTarget Target
58  {
59  [global::__DynamicallyInvokable]
60  get
61  {
62  return _target;
63  }
64  }
65 
68  [global::__DynamicallyInvokable]
70  {
71  [global::__DynamicallyInvokable]
72  get
73  {
74  return _kind;
75  }
76  }
77 
78  internal GotoExpression(GotoExpressionKind kind, LabelTarget target, Expression value, Type type)
79  {
80  _kind = kind;
81  _value = value;
82  _target = target;
83  _type = type;
84  }
85 
86  protected internal override Expression Accept(ExpressionVisitor visitor)
87  {
88  return visitor.VisitGoto(this);
89  }
90 
95  [global::__DynamicallyInvokable]
97  {
98  if (target == Target && value == Value)
99  {
100  return this;
101  }
102  return Expression.MakeGoto(Kind, target, value, Type);
103  }
104  }
105 }
LabelTarget Target
The target label where this node jumps to.
Expression Value
The value passed to the target, or null if the target is of type System.Void.
Definition: __Canon.cs:3
Used to represent the target of a T:System.Linq.Expressions.GotoExpression.
Definition: LabelTarget.cs:5
GotoExpression Update(LabelTarget target, Expression value)
Creates a new expression that is like this one, but using the supplied children. If all of the childr...
Provides the base class from which the classes that represent expression tree nodes are derived....
Definition: Expression.cs:17
Represents an unconditional jump. This includes return statements, break and continue statements,...
sealed override ExpressionType NodeType
Returns the node type of this T:System.Linq.Expressions.Expression.
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
GotoExpressionKind Kind
The kind of the "go to" expression. Serves information purposes only.
ExpressionType
Describes the node types for the nodes of an expression tree.
GotoExpressionKind
Specifies what kind of jump this T:System.Linq.Expressions.GotoExpression represents.