Application Environment of a .NET Dapr pluggable component

A .NET Dapr pluggable component application can be configured for dependency injection, logging, and configuration values similarly to ASP.NET applications. The exposes a similar set of configuration properties to that exposed by WebApplicationBuilder.

Warning

Use of IServiceCollection.AddScoped() is not recommended. Such instances’ lifetimes are bound to a single gRPC method call, which does not match the lifetime of an individual component instance.

Note

Like with ASP.NET, logger services (for example, ILogger<T>) are pre-registered.