次の方法で共有


HostingHostBuilderExtensions.ConfigureServices メソッド

定義

コンテナーにサービスを追加します。 これは複数回呼び出すことができ、その結果は加算されます。

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

パラメーター

hostBuilder
IHostBuilder

構成する IHostBuilder

configureDelegate
Action<IServiceCollection>

IServiceCollectionを構成するためのデリゲート。

戻り値

チェーン用の IHostBuilder の同じインスタンス。

適用対象