次の方法で共有


HttpServiceCollectionExtensions.AddHttpContextAccessor メソッド

定義

サービスの既定の実装を IHttpContextAccessor 追加します。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpContextAccessor (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHttpContextAccessor : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpContextAccessor (services As IServiceCollection) As IServiceCollection

パラメーター

戻り値

サービス コレクション。

適用対象