Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TryExpression.cs
Go to the documentation of this file.
5
7
8[DebuggerTypeProxy(typeof(TryExpressionProxy))]
9public sealed class TryExpression : Expression
10{
11 public sealed override Type Type { get; }
12
13 public sealed override ExpressionType NodeType => ExpressionType.Try;
14
15 public Expression Body { get; }
16
18
19 public Expression? Finally { get; }
20
21 public Expression? Fault { get; }
22
24 {
25 Type = type;
26 Body = body;
28 Finally = @finally;
29 Fault = fault;
30 }
31
32 protected internal override Expression Accept(ExpressionVisitor visitor)
33 {
34 return visitor.VisitTry(this);
35 }
36
38 {
39 if (((body == Body) & (@finally == Finally) & (fault == Fault)) && ExpressionUtils.SameElements(ref handlers, Handlers))
40 {
41 return this;
42 }
43 return Expression.MakeTry(Type, body, @finally, fault, handlers);
44 }
45}
static TryExpression MakeTry(Type? type, Expression body, Expression? @finally, Expression? fault, IEnumerable< CatchBlock >? handlers)
ReadOnlyCollection< CatchBlock > Handlers
TryExpression(Type type, Expression body, Expression @finally, Expression fault, ReadOnlyCollection< CatchBlock > handlers)
override Expression Accept(ExpressionVisitor visitor)
TryExpression Update(Expression body, IEnumerable< CatchBlock >? handlers, Expression? @finally, Expression? fault)