mscorlib(4.0.0.0) API with additions
CatchBlock.cs
1 using System.Diagnostics;
2 
4 {
6  [DebuggerTypeProxy(typeof(Expression.CatchBlockProxy))]
7  [global::__DynamicallyInvokable]
8  public sealed class CatchBlock
9  {
10  private readonly Type _test;
11 
12  private readonly ParameterExpression _var;
13 
14  private readonly Expression _body;
15 
16  private readonly Expression _filter;
17 
20  [global::__DynamicallyInvokable]
22  {
23  [global::__DynamicallyInvokable]
24  get
25  {
26  return _var;
27  }
28  }
29 
32  [global::__DynamicallyInvokable]
33  public Type Test
34  {
35  [global::__DynamicallyInvokable]
36  get
37  {
38  return _test;
39  }
40  }
41 
44  [global::__DynamicallyInvokable]
45  public Expression Body
46  {
47  [global::__DynamicallyInvokable]
48  get
49  {
50  return _body;
51  }
52  }
53 
56  [global::__DynamicallyInvokable]
57  public Expression Filter
58  {
59  [global::__DynamicallyInvokable]
60  get
61  {
62  return _filter;
63  }
64  }
65 
66  internal CatchBlock(Type test, ParameterExpression variable, Expression body, Expression filter)
67  {
68  _test = test;
69  _var = variable;
70  _body = body;
71  _filter = filter;
72  }
73 
76  [global::__DynamicallyInvokable]
77  public override string ToString()
78  {
79  return ExpressionStringBuilder.CatchBlockToString(this);
80  }
81 
87  [global::__DynamicallyInvokable]
89  {
90  if (variable == Variable && filter == Filter && body == Body)
91  {
92  return this;
93  }
94  return Expression.MakeCatchBlock(Test, variable, body, filter);
95  }
96  }
97 }
Expression Filter
Gets the body of the T:System.Linq.Expressions.CatchBlock filter.
Definition: CatchBlock.cs:58
Definition: __Canon.cs:3
override string ToString()
Returns a T:System.String that represents the current T:System.Object.
Definition: CatchBlock.cs:77
Expression Body
Gets the body of the catch block.
Definition: CatchBlock.cs:46
CatchBlock Update(ParameterExpression variable, Expression filter, Expression body)
Creates a new expression that is like this one, but using the supplied children. If all of the childr...
Definition: CatchBlock.cs:88
Provides the base class from which the classes that represent expression tree nodes are derived....
Definition: Expression.cs:17
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
ParameterExpression Variable
Gets a reference to the T:System.Exception object caught by this handler.
Definition: CatchBlock.cs:22
Type Test
Gets the type of T:System.Exception this handler catches.
Definition: CatchBlock.cs:34
Represents a named parameter expression.
Represents a catch statement in a try block.
Definition: CatchBlock.cs:8