IServiceCollection インターフェイス
定義
サービス記述子のコレクションのコントラクトを指定します。Specifies the contract for a collection of service descriptors.
public interface class IServiceCollection : System::Collections::Generic::ICollection<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^>, System::Collections::Generic::IEnumerable<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^>, System::Collections::Generic::IList<Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^>
public interface IServiceCollection : System.Collections.Generic.ICollection<Microsoft.Extensions.DependencyInjection.ServiceDescriptor>, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyInjection.ServiceDescriptor>, System.Collections.Generic.IList<Microsoft.Extensions.DependencyInjection.ServiceDescriptor>
type IServiceCollection = interface
interface IList<ServiceDescriptor>
interface ICollection<ServiceDescriptor>
interface seq<ServiceDescriptor>
interface IEnumerable
type IServiceCollection = interface
interface ICollection<ServiceDescriptor>
interface seq<ServiceDescriptor>
interface IEnumerable
interface IList<ServiceDescriptor>
Public Interface IServiceCollection
Implements ICollection(Of ServiceDescriptor), IEnumerable(Of ServiceDescriptor), IList(Of ServiceDescriptor)
- 派生
- 実装
プロパティ
Count |
ICollection<T> に格納されている要素の数を取得します。Gets the number of elements contained in the ICollection<T>. (継承元 ICollection<T>) |
IsReadOnly |
ICollection<T> が読み取り専用かどうかを示す値を取得します。Gets a value indicating whether the ICollection<T> is read-only. (継承元 ICollection<T>) |
Item[Int32] |
指定したインデックスにある要素を取得または設定します。Gets or sets the element at the specified index. (継承元 IList<T>) |
メソッド
Add(T) |
ICollection<T> に項目を追加します。Adds an item to the ICollection<T>. (継承元 ICollection<T>) |
Clear() |
ICollection<T> からすべての項目を削除します。Removes all items from the ICollection<T>. (継承元 ICollection<T>) |
Contains(T) |
ICollection<T> に特定の値が格納されているかどうかを判断します。Determines whether the ICollection<T> contains a specific value. (継承元 ICollection<T>) |
CopyTo(T[], Int32) |
ICollection<T> の要素を Array にコピーします。Array の特定のインデックスからコピーが開始されます。Copies the elements of the ICollection<T> to an Array, starting at a particular Array index. (継承元 ICollection<T>) |
GetEnumerator() |
コレクションを反復処理する列挙子を返します。Returns an enumerator that iterates through a collection. (継承元 IEnumerable) |
IndexOf(T) |
IList<T> 内の特定の項目のインデックスを確認します。Determines the index of a specific item in the IList<T>. (継承元 IList<T>) |
Insert(Int32, T) |
指定したインデックスの IList<T> に項目を挿入します。Inserts an item to the IList<T> at the specified index. (継承元 IList<T>) |
Remove(T) |
特定のオブジェクトが ICollection<T> 内にあるときに、最初に出現したものを削除します。Removes the first occurrence of a specific object from the ICollection<T>. (継承元 ICollection<T>) |
RemoveAt(Int32) |
指定したインデックスにある IList<T> 項目を削除します。Removes the IList<T> item at the specified index. (継承元 IList<T>) |
拡張メソッド
AddWebEncoders(IServiceCollection) |
指定の |
AddWebEncoders(IServiceCollection, Action<WebEncoderOptions>) |
指定の |
Add(IServiceCollection, ServiceDescriptor) |
指定した |
Add(IServiceCollection, IEnumerable<ServiceDescriptor>) |
ServiceDescriptor のシーケンスを |
RemoveAll(IServiceCollection, Type) |
種類が |
RemoveAll<T>(IServiceCollection) |
種類が |
Replace(IServiceCollection, ServiceDescriptor) |
サービスの種類が |
TryAdd(IServiceCollection, ServiceDescriptor) |
サービスの種類がまだ登録されていない場合、指定の |
TryAdd(IServiceCollection, IEnumerable<ServiceDescriptor>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddEnumerable(IServiceCollection, ServiceDescriptor) |
ServiceType を同じくする既存の記述子と |
TryAddEnumerable(IServiceCollection, IEnumerable<ServiceDescriptor>) |
ServiceType を同じくする既存の記述子と |
TryAddScoped(IServiceCollection, Type) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddScoped(IServiceCollection, Type, Type) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddScoped<TService>(IServiceCollection) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddScoped<TService,TImplementation>(IServiceCollection) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton(IServiceCollection, Type) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton(IServiceCollection, Type, Type) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton<TService>(IServiceCollection) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton<TService>(IServiceCollection, TService) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddSingleton<TService,TImplementation>(IServiceCollection) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddTransient(IServiceCollection, Type) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddTransient(IServiceCollection, Type, Type) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddTransient<TService>(IServiceCollection) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>) |
サービスの種類がまだ登録されていない場合、指定の |
TryAddTransient<TService,TImplementation>(IServiceCollection) |
サービスの種類がまだ登録されていない場合、指定の |
AddHealthChecks(IServiceCollection) |
正常性チェックを登録するために与えられたデリゲートを利用し、コンテナーに HealthCheckService を追加します。Adds the HealthCheckService to the container, using the provided delegate to register health checks. |
AddHttpClient(IServiceCollection) |
IHttpClientFactory と関連サービスを IServiceCollection に追加します。Adds the IHttpClientFactory and related services to the IServiceCollection. |
AddHttpClient(IServiceCollection, String) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、名前付き HttpClient を構成します。Adds the IHttpClientFactory and related services to the IServiceCollection and configures a named HttpClient. |
AddHttpClient(IServiceCollection, String, Action<IServiceProvider,HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、名前付き HttpClient を構成します。Adds the IHttpClientFactory and related services to the IServiceCollection and configures a named HttpClient. |
AddHttpClient(IServiceCollection, String, Action<HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、名前付き HttpClient を構成します。Adds the IHttpClientFactory and related services to the IServiceCollection and configures a named HttpClient. |
AddHttpClient<TClient>(IServiceCollection) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient>(IServiceCollection, Action<IServiceProvider,HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient>(IServiceCollection, Action<HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient>(IServiceCollection, String) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient>(IServiceCollection, String, Action<IServiceProvider,HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient>(IServiceCollection, String, Action<HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<IServiceProvider,HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, Action<HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,TImplementation>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, Func<HttpClient,IServiceProvider,TImplementation>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, String) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<IServiceProvider,HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Action<HttpClient>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,TImplementation>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddHttpClient<TClient,TImplementation>(IServiceCollection, String, Func<HttpClient,IServiceProvider,TImplementation>) |
IHttpClientFactory と関連サービスを IServiceCollection に追加し、 |
AddLocalization(IServiceCollection) |
アプリケーションのローカライズに必要なサービスを追加します。Adds services required for application localization. |
AddLocalization(IServiceCollection, Action<LocalizationOptions>) |
アプリケーションのローカライズに必要なサービスを追加します。Adds services required for application localization. |
AddLogging(IServiceCollection) |
指定の IServiceCollection にログ サービスを追加します。Adds logging services to the specified IServiceCollection. |
AddLogging(IServiceCollection, Action<ILoggingBuilder>) |
指定の IServiceCollection にログ サービスを追加します。Adds logging services to the specified IServiceCollection. |
AddDistributedMemoryCache(IServiceCollection) |
メモリに項目を格納する IDistributedCache の既定の実装を IServiceCollection に追加します。Adds a default implementation of IDistributedCache that stores items in memory to the IServiceCollection. 動作に分散キャッシュを必要とするフレームワークでは、その依存関係一覧の一部としてこの依存関係を安全に追加し、実装が少なくとも 1 つ利用できるように手配できます。Frameworks that require a distributed cache to work can safely add this dependency as part of their dependency list to ensure that there is at least one implementation available. |
AddDistributedMemoryCache(IServiceCollection, Action<MemoryDistributedCacheOptions>) |
メモリに項目を格納する IDistributedCache の既定の実装を IServiceCollection に追加します。Adds a default implementation of IDistributedCache that stores items in memory to the IServiceCollection. 動作に分散キャッシュを必要とするフレームワークでは、その依存関係一覧の一部としてこの依存関係を安全に追加し、実装が少なくとも 1 つ利用できるように手配できます。Frameworks that require a distributed cache to work can safely add this dependency as part of their dependency list to ensure that there is at least one implementation available. |
AddMemoryCache(IServiceCollection) |
IMemoryCache の非分散メモリ内実装を IServiceCollection に追加します。Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection. |
AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>) |
IMemoryCache の非分散メモリ内実装を IServiceCollection に追加します。Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection. |
Configure<TOptions>(IServiceCollection, IConfiguration) |
|
Configure<TOptions>(IServiceCollection, IConfiguration, Action<BinderOptions>) |
TOptions のバインド先となる構成インスタンスを登録します。Registers a configuration instance which TOptions will bind against. |
Configure<TOptions>(IServiceCollection, String, IConfiguration) |
TOptions のバインド先となる構成インスタンスを登録します。Registers a configuration instance which TOptions will bind against. |
Configure<TOptions>(IServiceCollection, String, IConfiguration, Action<BinderOptions>) |
TOptions のバインド先となる構成インスタンスを登録します。Registers a configuration instance which TOptions will bind against. |
AddOptions(IServiceCollection) |
オプションを使用するために必要なサービスを追加します。Adds services required for using options. |
AddOptions<TOptions>(IServiceCollection) |
同じ名前の |
AddOptions<TOptions>(IServiceCollection, String) |
同じ名前の |
Configure<TOptions>(IServiceCollection, Action<TOptions>) |
起動時に 1 回、特定の型のオプションを構成するために使用されるアクションを登録します。Registers an action used to configure a particular type of options once during startup. これは PostConfigure<TOptions>(IServiceCollection, Action<TOptions>) の前に実行されます。This is run before PostConfigure<TOptions>(IServiceCollection, Action<TOptions>). 構成を更新しても、このアクションは再度呼び出されません。Updates to the configuration does not invoke the action again. |
Configure<TOptions>(IServiceCollection, String, Action<TOptions>) |
特定の型のオプションを構成するために使用されるアクションを登録します。Registers an action used to configure a particular type of options. これらは、PostConfigure<TOptions>(IServiceCollection, Action<TOptions>) の前に実行されます。These are run before PostConfigure<TOptions>(IServiceCollection, Action<TOptions>). |
ConfigureAll<TOptions>(IServiceCollection, Action<TOptions>) |
特定の型のオプションのすべてのインスタンスを構成するために使用されるアクションを登録します。Registers an action used to configure all instances of a particular type of options. |
ConfigureOptions(IServiceCollection, Object) |
その |
ConfigureOptions(IServiceCollection, Type) |
その |
ConfigureOptions<TConfigureOptions>(IServiceCollection) |
その |
PostConfigure<TOptions>(IServiceCollection, Action<TOptions>) |
特定の型のオプションを初期化するために使用されるアクションを登録します。Registers an action used to initialize a particular type of options. これらは、Configure<TOptions>(IServiceCollection, Action<TOptions>) の後に実行されます。These are run after Configure<TOptions>(IServiceCollection, Action<TOptions>). |
PostConfigure<TOptions>(IServiceCollection, String, Action<TOptions>) |
特定の型のオプションを構成するために使用されるアクションを登録します。Registers an action used to configure a particular type of options. これらは、Configure<TOptions>(IServiceCollection, Action<TOptions>) の後に実行されます。These are run after Configure<TOptions>(IServiceCollection, Action<TOptions>). |
PostConfigureAll<TOptions>(IServiceCollection, Action<TOptions>) |
特定の型のオプションのすべてのインスタンスを後で構成するために使用されるアクションを登録します。Registers an action used to post configure all instances of a particular type of options. これらは、Configure<TOptions>(IServiceCollection, Action<TOptions>) の後に実行されます。These are run after Configure<TOptions>(IServiceCollection, Action<TOptions>). |
AddPolicyRegistry(IServiceCollection) |
IPolicyRegistry<TKey> と IReadOnlyPolicyRegistry<TKey> というサービスの種類でサービス コレクションに空の PolicyRegistry を登録し、新しく作成されたレジストリを返します。Registers an empty PolicyRegistry in the service collection with service types IPolicyRegistry<TKey>, and IReadOnlyPolicyRegistry<TKey> and returns the newly created registry. |
AddPolicyRegistry(IServiceCollection, IPolicyRegistry<String>) |
IPolicyRegistry<TKey> と IReadOnlyPolicyRegistry<TKey> というサービスの種類でサービス コレクションに指定の IPolicyRegistry<TKey> を登録し、新しく与えられたレジストリを返します。Registers the provided IPolicyRegistry<TKey> in the service collection with service types IPolicyRegistry<TKey>, and IReadOnlyPolicyRegistry<TKey> and returns the provided registry. |
AddDistributedRedisCache(IServiceCollection, Action<RedisCacheOptions>) |
指定した IServiceCollection に Redis 分散キャッシュ サービスを追加します。Adds Redis distributed caching services to the specified IServiceCollection. |
BuildServiceProvider(IServiceCollection) |
指定した IServiceCollection のサービスを格納する ServiceProvider を作成します。Creates a ServiceProvider containing services from the provided IServiceCollection. |
BuildServiceProvider(IServiceCollection, ServiceProviderOptions) |
指定した IServiceCollection のサービスを格納する ServiceProvider を作成し、必要に応じてサービスの作成とスコープの検証を有効にします。Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling service-creation and scope validation. |
BuildServiceProvider(IServiceCollection, Boolean) |
指定した IServiceCollection のサービスを格納する ServiceProvider を作成し、必要に応じてスコープの検証を有効にします。Creates a ServiceProvider containing services from the provided IServiceCollection optionally enabling scope validation. |
AddHostedService<THostedService>(IServiceCollection) |
指定した型の IHostedService の登録を追加します。Add an IHostedService registration for the given type. |
AddHostedService<THostedService>(IServiceCollection, Func<IServiceProvider,THostedService>) |
指定した型の IHostedService の登録を追加します。Add an IHostedService registration for the given type. |
AddScoped(IServiceCollection, Type) |
|
AddScoped(IServiceCollection, Type, Func<IServiceProvider,Object>) |
|
AddScoped(IServiceCollection, Type, Type) |
|
AddScoped<TService>(IServiceCollection) |
|
AddScoped<TService>(IServiceCollection, Func<IServiceProvider,TService>) |
|
AddScoped<TService,TImplementation>(IServiceCollection) |
|
AddScoped<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) |
|
AddSingleton(IServiceCollection, Type) |
|
AddSingleton(IServiceCollection, Type, Func<IServiceProvider,Object>) |
|
AddSingleton(IServiceCollection, Type, Object) |
|
AddSingleton(IServiceCollection, Type, Type) |
|
AddSingleton<TService>(IServiceCollection) |
|
AddSingleton<TService>(IServiceCollection, TService) |
|
AddSingleton<TService>(IServiceCollection, Func<IServiceProvider,TService>) |
|
AddSingleton<TService,TImplementation>(IServiceCollection) |
|
AddSingleton<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) |
|
AddTransient(IServiceCollection, Type) |
|
AddTransient(IServiceCollection, Type, Func<IServiceProvider,Object>) |
|
AddTransient(IServiceCollection, Type, Type) |
|
AddTransient<TService>(IServiceCollection) |
|
AddTransient<TService>(IServiceCollection, Func<IServiceProvider,TService>) |
|
AddTransient<TService,TImplementation>(IServiceCollection) |
|
AddTransient<TService,TImplementation>(IServiceCollection, Func<IServiceProvider,TImplementation>) |
|
AddDistributedSqlServerCache(IServiceCollection, Action<SqlServerCacheOptions>) |
指定した IServiceCollection に Microsoft SQL Server 分散キャッシュ サービスを追加します。Adds Microsoft SQL Server distributed caching services to the specified IServiceCollection. |
AddStackExchangeRedisCache(IServiceCollection, Action<RedisCacheOptions>) |
指定した IServiceCollection に Redis 分散キャッシュ サービスを追加します。Adds Redis distributed caching services to the specified IServiceCollection. |
CopyToDataTable<T>(IEnumerable<T>) |
指定した入力 DataTable オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |