Skip to content
DocsTry Aspire
DocsTry

AspireRedisClientBuilder Constructors

ClassConstructors1 member
Provides a builder for configuring Redis client services using StackExchange.Redis in an Aspire application.
Constructor(IHostApplicationBuilder, StackExchangeRedisSettings, string?)Section titled Constructor(IHostApplicationBuilder, StackExchangeRedisSettings, string?)
Provides a builder for configuring Redis client services using StackExchange.Redis in an Aspire application.
public sealed class AspireRedisClientBuilder
{
public AspireRedisClientBuilder(
IHostApplicationBuilder hostBuilder,
StackExchangeRedisSettings settings,
string? serviceKey)
{
// ...
}
}
hostBuilderIHostApplicationBuilderThe Hosting.IHostApplicationBuilder with which services are being registered.
settingsStackExchangeRedisSettingsThe StackExchangeRedisSettings to configure the Redis client.
serviceKeystring?The service key used to register the Redis.IConnectionMultiplexer service, if any.