MemoryCacheServiceCollectionExtensions.AddMemoryCache メソッド

定義

オーバーロード

AddMemoryCache(IServiceCollection)

IMemoryCache の非分散メモリ内実装を IServiceCollection に追加します。

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

IMemoryCache の非分散メモリ内実装を IServiceCollection に追加します。

AddMemoryCache(IServiceCollection)

ソース:
MemoryCacheServiceCollectionExtensions.cs
ソース:
MemoryCacheServiceCollectionExtensions.cs
ソース:
MemoryCacheServiceCollectionExtensions.cs
ソース:
MemoryCacheServiceCollectionExtensions.cs

IMemoryCache の非分散メモリ内実装を 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

サービスを追加する先の IServiceCollection

戻り値

追加の呼び出しをチェーンできるようにする IServiceCollection

適用対象

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

ソース:
MemoryCacheServiceCollectionExtensions.cs
ソース:
MemoryCacheServiceCollectionExtensions.cs
ソース:
MemoryCacheServiceCollectionExtensions.cs
ソース:
MemoryCacheServiceCollectionExtensions.cs

IMemoryCache の非分散メモリ内実装を 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

サービスを追加する先の IServiceCollection

setupAction
Action<MemoryCacheOptions>

指定した MemoryCacheOptions を構成する Action<T>

戻り値

追加の呼び出しをチェーンできるようにする IServiceCollection

適用対象