I have created a simple class which inherits from CircuitHandler
and it overrides OnConnectionUpAsync
.
Registered:
C#
public void ConfigureServices(IServiceCollection services) { ...
services.AddServerSideBlazor(); services.AddScoped<CircuitHandlerComponent>();
..
}
And injected in a razor page like this: @inject CircuitHandlerComponent CircuitHandlerComponent
Now I hit F5
in VS, but the problem is , the overridden method never gets called!?
Thanks for contacting us.
@Legends, please try to register your handler as a CircuitHandle
:
services.AddScoped<CircuitHandler, CircuitHandlerComponent>();
Most helpful comment
Thanks for contacting us.
@Legends, please try to register your handler as a
CircuitHandle
:services.AddScoped<CircuitHandler, CircuitHandlerComponent>();