MemoryCacheServiceCollectionExtensions.AddMemoryCache Método

Definição

Sobrecargas

AddMemoryCache(IServiceCollection)

Adiciona uma implementação na memória não distribuída de IMemoryCache ao IServiceCollection.

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Adiciona uma implementação na memória não distribuída de IMemoryCache ao IServiceCollection.

AddMemoryCache(IServiceCollection)

Adiciona uma implementação na memória não distribuída de IMemoryCache ao 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

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar serviços.

Retornos

IServiceCollection

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a

AddMemoryCache(IServiceCollection, Action<MemoryCacheOptions>)

Adiciona uma implementação na memória não distribuída de IMemoryCache ao 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

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar serviços.

setupAction
Action<MemoryCacheOptions>

O Action<T> para configurar o MemoryCacheOptions fornecido.

Retornos

IServiceCollection

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a