HttpClientFactoryServiceCollectionExtensions.AddHttpClient メソッド

定義

オーバーロード

名前 説明
AddHttpClient(IServiceCollection)

IHttpClientFactoryIServiceCollectionおよび関連サービスを追加します。

AddHttpClient(IServiceCollection, String)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、名前付きHttpClientを構成します。

AddHttpClient(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、名前付きHttpClientを構成します。

AddHttpClient(IServiceCollection, String, Action<HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、名前付きHttpClientを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,IServiceProvider,TImplementation>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,TImplementation>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,IServiceProvider,TImplementation>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

AddHttpClient<TClient,TImplementation>(IServiceCollection)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,TImplementation>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<IServiceProvider,HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

AddHttpClient<TClient>(IServiceCollection, String, Action<HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient>(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient>(IServiceCollection, String)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

AddHttpClient<TClient>(IServiceCollection, Action<HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

AddHttpClient<TClient>(IServiceCollection, Action<IServiceProvider,HttpClient>)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

AddHttpClient<TClient>(IServiceCollection)

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

AddHttpClient(IServiceCollection)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryIServiceCollectionおよび関連サービスを追加します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpClient (services As IServiceCollection) As IServiceCollection

パラメーター

返品

IServiceCollection

適用対象

AddHttpClient(IServiceCollection, String)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、名前付きHttpClientを構成します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name);
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function AddHttpClient (services As IServiceCollection, name As String) As IHttpClientBuilder

パラメーター

name
String

構成する HttpClient の論理名。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、名前付きHttpClientを構成します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Action<IServiceProvider ^, System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Action<IServiceProvider,System.Net.Http.HttpClient> configureClient);
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<IServiceProvider, System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function AddHttpClient (services As IServiceCollection, name As String, configureClient As Action(Of IServiceProvider, HttpClient)) As IHttpClientBuilder

パラメーター

name
String

構成する HttpClient の論理名。

configureClient
Action<IServiceProvider,HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient(IServiceCollection, String, Action<HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、名前付きHttpClientを構成します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Action<System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Action<System.Net.Http.HttpClient> configureClient);
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
<Extension()>
Public Function AddHttpClient (services As IServiceCollection, name As String, configureClient As Action(Of HttpClient)) As IHttpClientBuilder

パラメーター

name
String

構成する HttpClient の論理名。

configureClient
Action<HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,IServiceProvider,TImplementation>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Func<System::Net::Http::HttpClient ^, IServiceProvider ^, TImplementation> ^ factory);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Func<System.Net.Http.HttpClient,IServiceProvider,TImplementation> factory) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<System.Net.Http.HttpClient, IServiceProvider, #'Client> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, name As String, factory As Func(Of HttpClient, IServiceProvider, TImplementation)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。

パラメーター

name
String

構成する HttpClient の論理名。

factory
Func<HttpClient,IServiceProvider,TImplementation>

TClientのインスタンスを作成するために使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Action<System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Action<System.Net.Http.HttpClient> configureClient) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, name As String, configureClient As Action(Of HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。 指定された型は、 ITypedHttpClientFactory<TClient>によってインスタンス化されます。

パラメーター

name
String

構成する HttpClient の論理名。

configureClient
Action<HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Action<IServiceProvider ^, System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Action<IServiceProvider,System.Net.Http.HttpClient> configureClient) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<IServiceProvider, System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, name As String, configureClient As Action(Of IServiceProvider, HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。 指定された型は、 ITypedHttpClientFactory<TClient>によってインスタンス化されます。

パラメーター

name
String

構成する HttpClient の論理名。

configureClient
Action<IServiceProvider,HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, String)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, name As String) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。 指定された型は、 ITypedHttpClientFactory<TClient>によってインスタンス化されます。

パラメーター

name
String

構成する HttpClient の論理名。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,TImplementation>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<System::Net::Http::HttpClient ^, TImplementation> ^ factory);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<System.Net.Http.HttpClient,TImplementation> factory) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<System.Net.Http.HttpClient, #'Client> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, factory As Func(Of HttpClient, TImplementation)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。

パラメーター

factory
Func<HttpClient,TImplementation>

TClientのインスタンスを作成するために使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,IServiceProvider,TImplementation>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Func<System::Net::Http::HttpClient ^, IServiceProvider ^, TImplementation> ^ factory);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Func<System.Net.Http.HttpClient,IServiceProvider,TImplementation> factory) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Func<System.Net.Http.HttpClient, IServiceProvider, #'Client> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, factory As Func(Of HttpClient, IServiceProvider, TImplementation)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。

パラメーター

factory
Func<HttpClient,IServiceProvider,TImplementation>

TClientのインスタンスを作成するために使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<System.Net.Http.HttpClient> configureClient) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, configureClient As Action(Of HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。 指定された型は、 ITypedHttpClientFactory<TClient>によってインスタンス化されます。

パラメーター

configureClient
Action<HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。 指定された型は、 ITypedHttpClientFactory<TClient>によってインスタンス化されます。

パラメーター

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,TImplementation>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Func<System::Net::Http::HttpClient ^, TImplementation> ^ factory);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Func<System.Net.Http.HttpClient,TImplementation> factory) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Func<System.Net.Http.HttpClient, #'Client> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, name As String, factory As Func(Of HttpClient, TImplementation)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。

パラメーター

name
String

構成する HttpClient の論理名。

factory
Func<HttpClient,TImplementation>

TClientのインスタンスを作成するために使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

TImplementation

適用対象

AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<IServiceProvider,HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

public:
generic <typename TClient, typename TImplementation>
 where TClient : class where TImplementation : class, TClient[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<IServiceProvider ^, System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient,TImplementation>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<IServiceProvider,System.Net.Http.HttpClient> configureClient) where TClient : class where TImplementation : class, TClient;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<IServiceProvider, System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class, TImplementation As Class) (services As IServiceCollection, configureClient As Action(Of IServiceProvider, HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

TImplementation

型指定されたクライアントの実装型。 指定された型は、 ITypedHttpClientFactory<TClient>によってインスタンス化されます。

パラメーター

configureClient
Action<IServiceProvider,HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient>(IServiceCollection, String, Action<HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient>
 where TClient : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Action<System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Action<System.Net.Http.HttpClient> configureClient) where TClient : class;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class) (services As IServiceCollection, name As String, configureClient As Action(Of HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

パラメーター

name
String

構成する HttpClient の論理名。

configureClient
Action<HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient>(IServiceCollection, String, Action<IServiceProvider,HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient>
 where TClient : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Action<IServiceProvider ^, System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name, Action<IServiceProvider,System.Net.Http.HttpClient> configureClient) where TClient : class;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<IServiceProvider, System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class) (services As IServiceCollection, name As String, configureClient As Action(Of IServiceProvider, HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

パラメーター

name
String

構成する HttpClient の論理名。

configureClient
Action<IServiceProvider,HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient>(IServiceCollection, String)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。

public:
generic <typename TClient>
 where TClient : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name) where TClient : class;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class) (services As IServiceCollection, name As String) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

パラメーター

name
String

構成する HttpClient の論理名。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

DefaultNameを名前として使用して、既定のクライアントを構成します。

適用対象

AddHttpClient<TClient>(IServiceCollection, Action<HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

public:
generic <typename TClient>
 where TClient : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<System.Net.Http.HttpClient> configureClient) where TClient : class;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class) (services As IServiceCollection, configureClient As Action(Of HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

パラメーター

configureClient
Action<HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient>(IServiceCollection, Action<IServiceProvider,HttpClient>)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

public:
generic <typename TClient>
 where TClient : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<IServiceProvider ^, System::Net::Http::HttpClient ^> ^ configureClient);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<IServiceProvider,System.Net.Http.HttpClient> configureClient) where TClient : class;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<IServiceProvider, System.Net.Http.HttpClient> -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class) (services As IServiceCollection, configureClient As Action(Of IServiceProvider, HttpClient)) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

パラメーター

configureClient
Action<IServiceProvider,HttpClient>

HttpClientの構成に使用されるデリゲート。

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象

AddHttpClient<TClient>(IServiceCollection)

ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs
ソース:
HttpClientFactoryServiceCollectionExtensions.cs

IHttpClientFactoryおよび関連サービスをIServiceCollectionに追加し、TClient型と名前付きHttpClientの間のバインディングを構成します。 クライアント名は、 TClientの型名に設定されます。

public:
generic <typename TClient>
 where TClient : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ AddHttpClient(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IHttpClientBuilder AddHttpClient<TClient>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TClient : class;
static member AddHttpClient : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IHttpClientBuilder (requires 'Client : null)
<Extension()>
Public Function AddHttpClient(Of TClient As Class) (services As IServiceCollection) As IHttpClientBuilder

型パラメーター

TClient

型指定されたクライアントの型。 指定された型は、一時的なサービスとしてサービス コレクションに登録されます。 型指定されたクライアントの作成の詳細については、 ITypedHttpClientFactory<TClient> を参照してください。

パラメーター

返品

クライアントの構成に使用できる IHttpClientBuilder

注釈

HttpClient 指定された構成を適用するインスタンスは、 CreateClient(String) を使用して取得し、一致する名前を指定できます。

TClient適切なHttpClientで構築されたインスタンスは、サービスの種類としてTClientを指定することで、GetService(Type) (および関連するメソッド) から取得できます。

適用対象