Class ApplicationContextServiceCollectionExtension
Extension methods to register the IApplicationContext.
public static class ApplicationContextServiceCollectionExtension
- Inheritance
-
ApplicationContextServiceCollectionExtension
- Inherited Members
Methods
AddApplicationContext(IServiceCollection)
Add the default logger and properties contexted with the scoped instance application context.
To add the identity of the IApplicationContext to the entries of a logger resolved in a scope, register DefaultLoggingProperties
as IAddPropertiesToLog under the key "Scoped" (it is exported with that key for the Arc4u source generators).
public static IServiceCollection AddApplicationContext(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection.
Returns
- IServiceCollection
The service collection, to chain calls.
Examples
services.AddApplicationContext();