Sdílet prostřednictvím


MemoryCacheServiceCollectionExtensions.AddMemoryCache Metoda

Definice

Přetížení

AddMemoryCache(IServiceCollection)

Přidá nedistribuovanou implementaci IMemoryCache v paměti do .IServiceCollection

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Přidá nedistribuovanou implementaci IMemoryCache v paměti do .IServiceCollection

AddMemoryCache(IServiceCollection)

Zdroj:
MemoryCacheServiceCollectionExtensions.cs
Zdroj:
MemoryCacheServiceCollectionExtensions.cs
Zdroj:
MemoryCacheServiceCollectionExtensions.cs
Zdroj:
MemoryCacheServiceCollectionExtensions.cs

Přidá nedistribuovanou implementaci IMemoryCache v paměti do .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

Parametry

services
IServiceCollection

Chcete-li IServiceCollection přidat služby do.

Návraty

Aby IServiceCollection bylo možné zřetězovat další volání.

Platí pro

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Zdroj:
MemoryCacheServiceCollectionExtensions.cs
Zdroj:
MemoryCacheServiceCollectionExtensions.cs
Zdroj:
MemoryCacheServiceCollectionExtensions.cs
Zdroj:
MemoryCacheServiceCollectionExtensions.cs

Přidá nedistribuovanou implementaci IMemoryCache v paměti do .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

Parametry

services
IServiceCollection

Chcete-li IServiceCollection přidat služby do.

setupAction
Action<MemoryCacheOptions>

Pro Action<T> konfiguraci zadaného MemoryCacheOptions.

Návraty

Aby IServiceCollection bylo možné zřetězovat další volání.

Platí pro