1 type derived from ExceptionContext
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ResourceInvoker.cs (1)
1584
private sealed class ExceptionContextSealed :
ExceptionContext
100 references to ExceptionContext
BasicWebSite (1)
Filters\TestExceptionFilter.cs (1)
11
public override void OnException(
ExceptionContext
context)
Microsoft.AspNetCore.Mvc.Abstractions (5)
Filters\ExceptionContext.cs (1)
18
/// Instantiates a new <see cref="
ExceptionContext
"/> instance.
Filters\IAsyncExceptionFilter.cs (2)
14
/// <param name="context">The <see cref="
ExceptionContext
"/>.</param>
16
Task OnExceptionAsync(
ExceptionContext
context);
Filters\IExceptionFilter.cs (2)
14
/// <param name="context">The <see cref="
ExceptionContext
"/>.</param>
15
void OnException(
ExceptionContext
context);
Microsoft.AspNetCore.Mvc.Core (16)
Diagnostics\MvcDiagnostics.cs (6)
522
/// An <see cref="EventData"/> that occurs before <see cref="IExceptionFilter.OnException(
ExceptionContext
)"/>.
537
public BeforeExceptionFilterOnException(ActionDescriptor actionDescriptor,
ExceptionContext
exceptionContext, IFilterMetadata filter)
552
public
ExceptionContext
ExceptionContext { get; }
573
/// An <see cref="EventData"/> that occurs after <see cref="IExceptionFilter.OnException(
ExceptionContext
)"/>.
588
public AfterExceptionFilterOnExceptionEventData(ActionDescriptor actionDescriptor,
ExceptionContext
exceptionContext, IFilterMetadata filter)
603
public
ExceptionContext
ExceptionContext { get; }
Filters\ExceptionFilterAttribute.cs (2)
17
public virtual Task OnExceptionAsync(
ExceptionContext
context)
26
public virtual void OnException(
ExceptionContext
context)
MvcCoreDiagnosticListenerExtensions.cs (8)
378
ExceptionContext
exceptionContext,
392
private static void BeforeOnExceptionAsyncImpl(DiagnosticListener diagnosticListener,
ExceptionContext
exceptionContext, IAsyncExceptionFilter filter)
408
ExceptionContext
exceptionContext,
422
private static void AfterOnExceptionAsyncImpl(DiagnosticListener diagnosticListener,
ExceptionContext
exceptionContext, IAsyncExceptionFilter filter)
438
ExceptionContext
exceptionContext,
452
private static void BeforeOnExceptionImpl(DiagnosticListener diagnosticListener,
ExceptionContext
exceptionContext, IExceptionFilter filter)
468
ExceptionContext
exceptionContext,
482
private static void AfterOnExceptionImpl(DiagnosticListener diagnosticListener,
ExceptionContext
exceptionContext, IExceptionFilter filter)
Microsoft.AspNetCore.Mvc.Core.Test (3)
ApplicationModels\DefaultApplicationModelProviderTest.cs (1)
1818
public void OnException(
ExceptionContext
context)
Infrastructure\ControllerActionInvokerTest.cs (2)
784
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
785
.Callback<
ExceptionContext
>((c) =>
Microsoft.AspNetCore.Mvc.Core.TestCommon (73)
CommonResourceInvokerTest.cs (73)
41
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
50
filter.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Never());
59
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
60
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
70
f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()),
88
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
92
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
93
.Callback<
ExceptionContext
>(context =>
110
filter2.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Once());
130
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
131
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
135
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
136
.Callback<
ExceptionContext
>(context =>
144
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
155
f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()),
170
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
171
.Callback<
ExceptionContext
>(context =>
185
f => f.OnException(It.IsAny<
ExceptionContext
>()),
203
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
204
.Callback<
ExceptionContext
>(context =>
223
f => f.OnException(It.IsAny<
ExceptionContext
>()),
237
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
238
.Callback<
ExceptionContext
>(context =>
251
f => f.OnException(It.IsAny<
ExceptionContext
>()),
269
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
270
.Callback<
ExceptionContext
>(context =>
289
f => f.OnException(It.IsAny<
ExceptionContext
>()),
303
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
304
.Callback<
ExceptionContext
>(context =>
308
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
319
f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()),
337
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
338
.Callback<
ExceptionContext
>(context =>
343
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
358
f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()),
372
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
373
.Callback<
ExceptionContext
>(context =>
377
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
387
f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()),
405
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
406
.Callback<
ExceptionContext
>(context =>
411
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
426
f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()),
444
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
445
.Callback<
ExceptionContext
>(context =>
449
.Returns<
ExceptionContext
>((context) => Task.FromResult(true))
454
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
455
.Callback<
ExceptionContext
>(c => { }) // Does nothing, we just want to verify that it was called.
468
filter1.Verify(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()), Times.Once());
469
filter2.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Once());
479
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
488
filter.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Once());
503
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
504
.Callback<
ExceptionContext
>(c => c.Result = result.Object)
515
filter.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Once());
531
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
532
.Callback<
ExceptionContext
>(c => c.Result = result.Object)
537
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
538
.Callback<
ExceptionContext
>(c => { }) // Does nothing, we just want to verify that it was called.
551
filter1.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Once());
552
filter2.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Once());
570
exceptionFilter.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Never());
695
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
696
.Callback<
ExceptionContext
>(context =>
728
exceptionFilter.Verify(f => f.OnException(It.IsAny<
ExceptionContext
>()), Times.Never());
1254
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
1255
.Callback<
ExceptionContext
>((c) =>
1945
.Setup(f => f.OnExceptionAsync(It.IsAny<
ExceptionContext
>()))
1946
.Returns<
ExceptionContext
>(c =>
1976
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
1977
.Callback<
ExceptionContext
>(c => c.Result = Result);
2005
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
2006
.Callback<
ExceptionContext
>(c => c.Result = Result);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageActionInvokerTest.cs (2)
1314
.Setup(f => f.OnException(It.IsAny<
ExceptionContext
>()))
1315
.Callback<
ExceptionContext
>((c) =>