Class RedisServiceCollectionExtensions
Inheritance
Namespace: Steeltoe.Connectors.Redis
Assembly: Steeltoe.Connectors.dll
Syntax
public static class RedisServiceCollectionExtensions : object
Methods
| Edit this page View SourceAddRedis(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
Declaration
public static IServiceCollection AddRedis(this IServiceCollection services, IConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The |
IConfiguration | configuration | The |
Returns
Type | Description |
---|---|
IServiceCollection | The incoming |
AddRedis(IServiceCollection, IConfiguration, Nullable<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
Declaration
public static IServiceCollection AddRedis(this IServiceCollection services, IConfiguration configuration, Action<ConnectorAddOptionsBuilder>? addAction)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The |
IConfiguration | configuration | The |
System.Nullable<Action<ConnectorAddOptionsBuilder>> | addAction | An optional delegate to configure this connector. |
Returns
Type | Description |
---|---|
IServiceCollection | The incoming |