1 instantiation of CatchBlock
System.Linq.Expressions (1)
System\Linq\Expressions\CatchBlock.cs (1)
154
return new
CatchBlock
(type, variable, body, filter);
68 references to CatchBlock
netstandard (1)
netstandard.cs (1)
988
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
CatchBlock
))]
System.Core (1)
System.Core.cs (1)
126
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
CatchBlock
))]
System.Linq.Expressions (66)
System\Linq\Expressions\CatchBlock.cs (21)
40
/// Gets the body of the <see cref="
CatchBlock
"/>'s filter.
62
public
CatchBlock
Update(ParameterExpression? variable, Expression? filter, Expression body)
75
/// Creates a <see cref="
CatchBlock
"/> representing a catch statement.
77
/// will be available for use in the <see cref="
CatchBlock
"/>.
79
/// <param name="type">The <see cref="Type"/> of <see cref="Exception"/> this <see cref="
CatchBlock
"/> will handle.</param>
81
/// <returns>The created <see cref="
CatchBlock
"/>.</returns>
82
public static
CatchBlock
Catch(Type type, Expression body)
88
/// Creates a <see cref="
CatchBlock
"/> representing a catch statement with a reference to the caught object for use in the handler body.
92
/// <returns>The created <see cref="
CatchBlock
"/>.</returns>
93
public static
CatchBlock
Catch(ParameterExpression variable, Expression body)
100
/// Creates a <see cref="
CatchBlock
"/> representing a catch statement with
103
/// <param name="type">The <see cref="Type"/> of <see cref="Exception"/> this <see cref="
CatchBlock
"/> will handle.</param>
106
/// <returns>The created <see cref="
CatchBlock
"/>.</returns>
107
public static
CatchBlock
Catch(Type type, Expression body, Expression? filter)
113
/// Creates a <see cref="
CatchBlock
"/> representing a catch statement with
119
/// <returns>The created <see cref="
CatchBlock
"/>.</returns>
120
public static
CatchBlock
Catch(ParameterExpression variable, Expression body, Expression? filter)
127
/// Creates a <see cref="
CatchBlock
"/> representing a catch statement with the specified elements.
129
/// <param name="type">The <see cref="Type"/> of <see cref="Exception"/> this <see cref="
CatchBlock
"/> will handle.</param>
133
/// <returns>The created <see cref="
CatchBlock
"/>.</returns>
135
public static
CatchBlock
MakeCatchBlock(Type type, ParameterExpression? variable, Expression body, Expression? filter)
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
492
return new[] { ((
CatchBlock
)scope).Variable! };
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (4)
118
return ((
CatchBlock
)node).Variable != null;
794
private void EmitSaveExceptionOrPop(
CatchBlock
cb)
840
foreach (
CatchBlock
cb in node.Handlers)
914
private void EmitCatchStart(
CatchBlock
cb)
System\Linq\Expressions\Compiler\StackSpiller.cs (4)
958
ReadOnlyCollection<
CatchBlock
> handlers = node.Handlers;
959
CatchBlock
[]? clone = null;
968
CatchBlock
handler = handlers[i];
1016
handlers = new ReadOnlyCollection<
CatchBlock
>(clone);
System\Linq\Expressions\Compiler\VariableBinder.cs (2)
130
protected override
CatchBlock
VisitCatchBlock(
CatchBlock
node)
System\Linq\Expressions\DebugViewWriter.cs (2)
1066
protected override
CatchBlock
VisitCatchBlock(
CatchBlock
node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (3)
55
private readonly
CatchBlock
_node;
57
public CatchBlockProxy(
CatchBlock
node)
450
public ReadOnlyCollection<
CatchBlock
> Handlers => _node.Handlers;
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
77
internal static string CatchBlockToString(
CatchBlock
node)
730
protected override
CatchBlock
VisitCatchBlock(
CatchBlock
node)
System\Linq\Expressions\ExpressionVisitor.cs (3)
495
/// Visits the children of the <see cref="
CatchBlock
"/>.
500
protected virtual
CatchBlock
VisitCatchBlock(
CatchBlock
node)
System\Linq\Expressions\Interpreter\LightCompiler.cs (3)
2007
foreach (
CatchBlock
handler in node.Handlers)
2811
protected override
CatchBlock
VisitCatchBlock(
CatchBlock
node)
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
556
protected override
CatchBlock
VisitCatchBlock(
CatchBlock
node)
System\Linq\Expressions\TryExpression.cs (16)
15
/// The handlers consist of a set of <see cref="
CatchBlock
"/>s that can either be catch or filters.
24
internal TryExpression(Type type, Expression body, Expression? @finally, Expression? fault, ReadOnlyCollection<
CatchBlock
> handlers)
51
/// Gets the collection of <see cref="
CatchBlock
"/>s associated with the try block.
53
public ReadOnlyCollection<
CatchBlock
> Handlers { get; }
83
public TryExpression Update(Expression body, IEnumerable<
CatchBlock
>? handlers, Expression? @finally, Expression? fault)
125
/// <param name="handlers">The array of zero or more <see cref="
CatchBlock
"/>s representing the catch statements to be associated with the try block.</param>
127
public static TryExpression TryCatch(Expression body, params
CatchBlock
[]? handlers)
137
/// <param name="handlers">The array of zero or more <see cref="
CatchBlock
"/>s representing the catch statements to be associated with the try block.</param>
139
public static TryExpression TryCatchFinally(Expression body, Expression? @finally, params
CatchBlock
[]? handlers)
151
/// <param name="handlers">A collection of <see cref="
CatchBlock
"/>s representing the catch statements to be associated with the try block.</param>
153
public static TryExpression MakeTry(Type? type, Expression body, Expression? @finally, Expression? fault, IEnumerable<
CatchBlock
>? handlers)
157
ReadOnlyCollection<
CatchBlock
> @catch = handlers.ToReadOnly();
182
private static void ValidateTryAndCatchHaveSameType(Type? type, Expression tryBody, ReadOnlyCollection<
CatchBlock
> handlers)
194
foreach (
CatchBlock
cb in handlers)
206
foreach (
CatchBlock
cb in handlers)
219
foreach (
CatchBlock
cb in handlers)
System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs (2)
111
protected override
CatchBlock
VisitCatchBlock(
CatchBlock
node)