37 references to CircuitHandler
Microsoft.AspNetCore.Components.Server (17)
Circuits\CircuitFactory.cs (1)
93
var circuitHandlers = components.Count == 0 ? [] : scope.ServiceProvider.GetServices<
CircuitHandler
>()
Circuits\CircuitHandler.cs (3)
7
/// A <see cref="
CircuitHandler
"/> allows running code during specific lifetime events of a <see cref="Circuit"/>.
28
/// Gets the execution order for the current instance of <see cref="
CircuitHandler
"/>.
30
/// When multiple <see cref="
CircuitHandler
"/> instances are registered, the <see cref="Order"/>
Circuits\CircuitHost.cs (13)
27
private
CircuitHandler
[] _circuitHandlers;
49
CircuitHandler
[] circuitHandlers,
240
var
circuitHandler = _circuitHandlers[i];
247
Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(
CircuitHandler
.OnCircuitOpenedAsync), ex);
269
var
circuitHandler = _circuitHandlers[i];
276
Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(
CircuitHandler
.OnConnectionUpAsync), ex);
298
var
circuitHandler = _circuitHandlers[i];
305
Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(
CircuitHandler
.OnConnectionDownAsync), ex);
325
var
circuitHandler = _circuitHandlers[i];
332
Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(
CircuitHandler
.OnCircuitClosedAsync), ex);
631
private static Func<Func<Task>, Task> BuildInboundActivityDispatcher(IReadOnlyList<
CircuitHandler
> circuitHandlers, Circuit circuit)
766
_circuitHandlers = [.. _scope.ServiceProvider.GetServices<
CircuitHandler
>().OrderBy(h => h.Order)];
915
public static void CircuitHandlerFailed(ILogger logger,
CircuitHandler
handler, string handlerMethod, Exception exception)
Microsoft.AspNetCore.Components.Server.Tests (20)
Circuits\CircuitHostTest.cs (11)
74
var handler = new Mock<
CircuitHandler
>();
163
var handler1 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
164
var handler2 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
250
var handler = new Mock<
CircuitHandler
>(MockBehavior.Strict);
294
var handler1 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
295
var handler2 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
338
var handler1 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
339
var handler2 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
340
var handler3 = new Mock<
CircuitHandler
>(MockBehavior.Strict);
651
private static void SetupMockInboundActivityHandlers(MockSequence sequence, params Mock<
CircuitHandler
>[] circuitHandlers)
663
private static void SetupMockInboundActivityHandler(Mock<
CircuitHandler
> circuitHandler)
Circuits\CircuitRegistryTest.cs (6)
87
var handler = new Mock<
CircuitHandler
> { CallBase = true };
111
var handler = new Mock<
CircuitHandler
> { CallBase = true };
135
var handler = new Mock<
CircuitHandler
> { CallBase = true };
174
var handler = new Mock<
CircuitHandler
> { CallBase = true };
193
var handler = new Mock<
CircuitHandler
> { CallBase = true };
212
var handler = new Mock<
CircuitHandler
> { CallBase = true };
Circuits\TestCircuitHost.cs (3)
16
private TestCircuitHost(CircuitId circuitId, AsyncServiceScope scope, CircuitOptions options, CircuitClientProxy client, RemoteRenderer renderer, IReadOnlyList<ComponentDescriptor> descriptors, RemoteJSRuntime jsRuntime, RemoteNavigationManager navigationManager,
CircuitHandler
[] circuitHandlers, ILogger logger)
26
CircuitHandler
[] handlers = null,
52
handlers ??= Array.Empty<
CircuitHandler
>();