Class RedisServiceCollectionExtensions
- Namespace
- Steeltoe.Connectors.Redis
- Assembly
- Steeltoe.Connectors.dll
public static class RedisServiceCollectionExtensions
- Inheritance
-
RedisServiceCollectionExtensions
- Inherited Members
Methods
AddRedis(IServiceCollection, IConfiguration)
Registers a ConnectorFactory<TOptions, TConnection> (with type parameters RedisOptions and StackExchange.Redis.IConnectionMultiplexer) to connect to a Redis database. If Microsoft.Extensions.Caching.StackExchangeRedis is referenced, this method additionally registers a ConnectorFactory<TOptions, TConnection> with type parameters RedisOptions and IDistributedCache.
public static IServiceCollection AddRedis(this IServiceCollection services, IConfiguration configuration)
Parameters
services
IServiceCollectionThe IServiceCollection to add services to.
configuration
IConfigurationThe IConfiguration to read application settings from.
Returns
- IServiceCollection
The incoming
services
so that additional calls can be chained.
AddRedis(IServiceCollection, IConfiguration, Action<ConnectorAddOptionsBuilder>?)
Registers a ConnectorFactory<TOptions, TConnection> (with type parameters RedisOptions and StackExchange.Redis.IConnectionMultiplexer) to connect to a Redis database. If Microsoft.Extensions.Caching.StackExchangeRedis is referenced, this method additionally registers a ConnectorFactory<TOptions, TConnection> with type parameters RedisOptions and IDistributedCache.
public static IServiceCollection AddRedis(this IServiceCollection services, IConfiguration configuration, Action<ConnectorAddOptionsBuilder>? addAction)
Parameters
services
IServiceCollectionThe IServiceCollection to add services to.
configuration
IConfigurationThe IConfiguration to read application settings from.
addAction
Action<ConnectorAddOptionsBuilder>An optional delegate to configure this connector.
Returns
- IServiceCollection
The incoming
services
so that additional calls can be chained.