You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classes attributed with the Expose attribute the class will be registered with the dependency injection container. If no type is specified it will be registered by interface if available otherwise it will be concrete instance.
Singleton
Classes attributed with Singleton will be registered as singletons.
Scoped
Classes attributed with Scoped will be registered as scoped.
RegisterDependencies
Sometimes it's useful to register dependencies directly vs. using Attributes. To support this use case you can create a RegisterDependencies method in your HardenedStartup class
[HardenedStartup]
public class Application
{
private void RegisterDependencies(IEnvironment environment, IServiceCollection collection)
{
}
}