Immediate.Injections
Registering Services
Services can be marked for registration using the RegisterScoped, RegisterSingleton, or RegisterTransient
attributes. These attributes support various options to control how the service is registered (e.g. which interfaces,
duplicate handling, factories, tags).
Adding declared registrations to the IServiceCollection collection
In your Program.cs, add a call to services.AddXxxServices(), where Xxx is the application identifier. By default,
this is the short form of the assembly name. For example:
- For a project named
Web, it will beservices.AddWebHandlers() - For a project named
Application.Web, it will beservices.AddApplicationWebHandlers()
However, this name can be overridden using [assembly: ImmediateAssemblyIdentifierAttribute("SomeIdentifier")].