共用方式為


IHost.Services Property

Definition

Gets the services configured for the program (for example, using ConfigureServices(Action<HostBuilderContext,IServiceCollection>)).

public:
 property IServiceProvider ^ Services { IServiceProvider ^ get(); };
public IServiceProvider Services { get; }
member this.Services : IServiceProvider
Public ReadOnly Property Services As IServiceProvider

Property Value

Applies to