37 references to CircuitHandler
Microsoft.AspNetCore.Components.Server (17)
Circuits\CircuitFactory.cs (1)
93var 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)
27private CircuitHandler[] _circuitHandlers; 49CircuitHandler[] circuitHandlers, 240var circuitHandler = _circuitHandlers[i]; 247Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnCircuitOpenedAsync), ex); 269var circuitHandler = _circuitHandlers[i]; 276Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnConnectionUpAsync), ex); 298var circuitHandler = _circuitHandlers[i]; 305Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnConnectionDownAsync), ex); 325var circuitHandler = _circuitHandlers[i]; 332Log.CircuitHandlerFailed(_logger, circuitHandler, nameof(CircuitHandler.OnCircuitClosedAsync), ex); 631private static Func<Func<Task>, Task> BuildInboundActivityDispatcher(IReadOnlyList<CircuitHandler> circuitHandlers, Circuit circuit) 766_circuitHandlers = [.. _scope.ServiceProvider.GetServices<CircuitHandler>().OrderBy(h => h.Order)]; 915public static void CircuitHandlerFailed(ILogger logger, CircuitHandler handler, string handlerMethod, Exception exception)
Microsoft.AspNetCore.Components.Server.Tests (20)
Circuits\CircuitHostTest.cs (11)
74var handler = new Mock<CircuitHandler>(); 163var handler1 = new Mock<CircuitHandler>(MockBehavior.Strict); 164var handler2 = new Mock<CircuitHandler>(MockBehavior.Strict); 250var handler = new Mock<CircuitHandler>(MockBehavior.Strict); 294var handler1 = new Mock<CircuitHandler>(MockBehavior.Strict); 295var handler2 = new Mock<CircuitHandler>(MockBehavior.Strict); 338var handler1 = new Mock<CircuitHandler>(MockBehavior.Strict); 339var handler2 = new Mock<CircuitHandler>(MockBehavior.Strict); 340var handler3 = new Mock<CircuitHandler>(MockBehavior.Strict); 651private static void SetupMockInboundActivityHandlers(MockSequence sequence, params Mock<CircuitHandler>[] circuitHandlers) 663private static void SetupMockInboundActivityHandler(Mock<CircuitHandler> circuitHandler)
Circuits\CircuitRegistryTest.cs (6)
87var handler = new Mock<CircuitHandler> { CallBase = true }; 111var handler = new Mock<CircuitHandler> { CallBase = true }; 135var handler = new Mock<CircuitHandler> { CallBase = true }; 174var handler = new Mock<CircuitHandler> { CallBase = true }; 193var handler = new Mock<CircuitHandler> { CallBase = true }; 212var handler = new Mock<CircuitHandler> { CallBase = true };
Circuits\TestCircuitHost.cs (3)
16private TestCircuitHost(CircuitId circuitId, AsyncServiceScope scope, CircuitOptions options, CircuitClientProxy client, RemoteRenderer renderer, IReadOnlyList<ComponentDescriptor> descriptors, RemoteJSRuntime jsRuntime, RemoteNavigationManager navigationManager, CircuitHandler[] circuitHandlers, ILogger logger) 26CircuitHandler[] handlers = null, 52handlers ??= Array.Empty<CircuitHandler>();