MemoryCacheServiceCollectionExtensions.AddMemoryCache メソッド

定義

オーバーロード

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.

AddMemoryCache(IServiceCollection)

IMemoryCache の非分散メモリ内実装を IServiceCollection に追加します。Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection.

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

パラメーター

services
IServiceCollection

サービスを追加する先の IServiceCollectionThe IServiceCollection to add services to.

戻り値

IServiceCollection

追加の呼び出しをチェーンできるようにする IServiceCollectionThe IServiceCollection so that additional calls can be chained.

適用対象

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

IMemoryCache の非分散メモリ内実装を IServiceCollection に追加します。Adds a non distributed in memory implementation of IMemoryCache to the IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddMemoryCache(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Caching::Memory::MemoryCacheOptions ^> ^ setupAction);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddMemoryCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> setupAction);
static member AddMemoryCache : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddMemoryCache (services As IServiceCollection, setupAction As Action(Of MemoryCacheOptions)) As IServiceCollection

パラメーター

services
IServiceCollection

サービスを追加する先の IServiceCollectionThe IServiceCollection to add services to.

setupAction
Action<MemoryCacheOptions>

指定した MemoryCacheOptions を構成する Action<T>The Action<T> to configure the provided MemoryCacheOptions.

戻り値

IServiceCollection

追加の呼び出しをチェーンできるようにする IServiceCollectionThe IServiceCollection so that additional calls can be chained.

適用対象