1 instantiation of CatchBlock
System.Linq.Expressions (1)
System\Linq\Expressions\CatchBlock.cs (1)
154return 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. 62public 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> 82public 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> 93public 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> 107public 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> 120public 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> 135public static CatchBlock MakeCatchBlock(Type type, ParameterExpression? variable, Expression body, Expression? filter)
System\Linq\Expressions\Compiler\CompilerScope.cs (1)
492return new[] { ((CatchBlock)scope).Variable! };
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (4)
118return ((CatchBlock)node).Variable != null; 794private void EmitSaveExceptionOrPop(CatchBlock cb) 840foreach (CatchBlock cb in node.Handlers) 914private void EmitCatchStart(CatchBlock cb)
System\Linq\Expressions\Compiler\StackSpiller.cs (4)
958ReadOnlyCollection<CatchBlock> handlers = node.Handlers; 959CatchBlock[]? clone = null; 968CatchBlock handler = handlers[i]; 1016handlers = new ReadOnlyCollection<CatchBlock>(clone);
System\Linq\Expressions\Compiler\VariableBinder.cs (2)
130protected override CatchBlock VisitCatchBlock(CatchBlock node)
System\Linq\Expressions\DebugViewWriter.cs (2)
1066protected override CatchBlock VisitCatchBlock(CatchBlock node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (3)
55private readonly CatchBlock _node; 57public CatchBlockProxy(CatchBlock node) 450public ReadOnlyCollection<CatchBlock> Handlers => _node.Handlers;
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
77internal static string CatchBlockToString(CatchBlock node) 730protected override CatchBlock VisitCatchBlock(CatchBlock node)
System\Linq\Expressions\ExpressionVisitor.cs (3)
495/// Visits the children of the <see cref="CatchBlock"/>. 500protected virtual CatchBlock VisitCatchBlock(CatchBlock node)
System\Linq\Expressions\Interpreter\LightCompiler.cs (3)
2007foreach (CatchBlock handler in node.Handlers) 2811protected override CatchBlock VisitCatchBlock(CatchBlock node)
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
556protected 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. 24internal 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. 53public ReadOnlyCollection<CatchBlock> Handlers { get; } 83public 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> 127public 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> 139public 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> 153public static TryExpression MakeTry(Type? type, Expression body, Expression? @finally, Expression? fault, IEnumerable<CatchBlock>? handlers) 157ReadOnlyCollection<CatchBlock> @catch = handlers.ToReadOnly(); 182private static void ValidateTryAndCatchHaveSameType(Type? type, Expression tryBody, ReadOnlyCollection<CatchBlock> handlers) 194foreach (CatchBlock cb in handlers) 206foreach (CatchBlock cb in handlers) 219foreach (CatchBlock cb in handlers)
System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs (2)
111protected override CatchBlock VisitCatchBlock(CatchBlock node)