2 writes to PasswordParameter
Aspire.Hosting.Redis (2)
RedisResource.cs (2)
28PasswordParameter = password; 137PasswordParameter = password;
34 references to PasswordParameter
Aspire.Hosting.Azure.Redis (4)
AzureManagedRedisResource.cs (2)
128(InnerResource.PasswordParameter is not null ? 129ReferenceExpression.Create($"{InnerResource.PasswordParameter}") :
AzureRedisCacheResource.cs (2)
93InnerResource is not null && InnerResource.PasswordParameter is not null ? 94ReferenceExpression.Create($"{InnerResource.PasswordParameter}") :
Aspire.Hosting.Azure.Tests (8)
AzureManagedRedisExtensionsTests.cs (3)
64Assert.NotNull(redisResource?.PasswordParameter); 65Assert.Equal($"localhost:12455,password={await redisResource.PasswordParameter.GetValueAsync(CancellationToken.None)}{sslArg}", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 98Assert.NotNull(redisResource?.PasswordParameter);
AzureRedisExtensionsTests.cs (5)
106Assert.NotNull(redisResource?.PasswordParameter); 108Assert.Equal($"localhost:12455,password={redisResource.PasswordParameter.Value}", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 142Assert.NotNull(redisResource?.PasswordParameter); 245Assert.NotNull(redis.Resource.PasswordParameter); 248Assert.Equal($"localhost:12455,password={redis.Resource.PasswordParameter.Value}", await redis.Resource.GetConnectionStringAsync());
Aspire.Hosting.Redis (13)
RedisBuilderExtensions.cs (7)
106if (redis.PasswordParameter is { } password) 118if (redis.PasswordParameter is not null) 252if (resource.PasswordParameter is { } passwordParameter) 329if (redisInstance.PasswordParameter is not null) 331var password = await redisInstance.PasswordParameter.GetValueAsync(ct).ConfigureAwait(false); 402if (redisInstance.PasswordParameter is not null) 404context.EnvironmentVariables[$"RI_REDIS_PASSWORD{counter}"] = redisInstance.PasswordParameter;
RedisResource.cs (6)
92if (PasswordParameter is not null) 94builder.Append($",password={PasswordParameter}"); 154if (PasswordParameter is not null) 156builder.Append($":{PasswordParameter:uri}@"); 172if (PasswordParameter is not null) 174yield return new("Password", ReferenceExpression.Create($"{PasswordParameter}"));
Aspire.Hosting.Redis.Tests (5)
AddRedisTests.cs (5)
391Assert.Equal(redis1.Resource.PasswordParameter!.Value, item.Value); 413Assert.Equal(redis2.Resource.PasswordParameter!.Value, item.Value); 571Assert.Equal($"myredis1:{redis.Resource.Name}:6379:0:{redis.Resource.PasswordParameter?.Value}", config["REDIS_HOSTS"]); 618Assert.Equal($"myredis1:{redis1.Resource.Name}:6379:0:{redis1.Resource.PasswordParameter?.Value},myredis2:myredis2:6379:0:{redis2.Resource.PasswordParameter?.Value}", config["REDIS_HOSTS"]);
Aspire.Hosting.Tests (4)
DistributedApplicationTests.cs (4)
1940Assert.Equal($"localhost:{port},password={redis.Resource.PasswordParameter?.Value}{sslVal}", env.Value); 1961Assert.Equal($"localhost:{otherRedisPort},password={redisNoPort.Resource.PasswordParameter?.Value}{sslVal}", otherRedisEnv.Value); 2020Assert.Equal($"localhost:{port},password={redis.Resource.PasswordParameter!.Value}{sslVal}", env.Value); 2041Assert.Equal($"localhost:{otherRedisPort},password={redisNoPort.Resource.PasswordParameter!.Value}{sslVal}", otherRedisEnv.Value);