DistributedApplication.Services Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the IServiceProvider instance configured for the application.
public IServiceProvider Services { get; }
member this.Services : IServiceProvider
Public ReadOnly Property Services As IServiceProvider
Property Value
Implements
Remarks
The DistributedApplication is an IHost implementation and as such exposes a Services property which allows developers to get services from the dependency injection container after DistributedApplication instance has been built using the Build() method.
To add services to the dependency injection container developers should use the Services property to access the IServiceCollection instance.