Aracılığıyla paylaş


HostingHostBuilderExtensions.ConfigureServices Yöntem

Tanım

Kapsayıcıya hizmet ekler. Bu, birden çok kez çağrılabilir ve sonuçlar eklenebilir olacaktır.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureServices(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::DependencyInjection::IServiceCollection ^> ^ configureDelegate);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureServices (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate);
static member ConfigureServices : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureServices (hostBuilder As IHostBuilder, configureDelegate As Action(Of IServiceCollection)) As IHostBuilder

Parametreler

hostBuilder
IHostBuilder

IHostBuilder yapılandırılır.

configureDelegate
Action<IServiceCollection>

öğesini yapılandırmak IServiceCollectioniçin temsilci.

Döndürülenler

Zincirleme için aynı IHostBuilder örneği.

Şunlara uygulanır