public class LogInterceptor : ComponentInterceptorBase
{
public override void InterceptOnInitialized(IBlazorComponent component)
{
// invoke in OnInitialized() method
if(component is not BlazorComponentBase componentBase)
{
return;
}
//Write your code
}
}
builder.Service.AddComponentBuilder(configure => {
configure.Interceptors.Add(new LogInterceptor());
})