In a .NET Core project I have a Filter class defined like this:
[AttributeUsage(AttributeTargets.Class)]
public sealed class GlobalExceptionFilterAttribute : ExceptionFilterAttribute
{
... }
}
which I can reference from
public class WebApiApplication : HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configuration.Filters.Add(new GlobalExceptionFilterAttribute());
}
}
}
How can filtering be implemented also in a class library or in a console app, what it is the equivalent of Application_Start there? Thank you