2 writes to PasswordParameter
Aspire.Hosting.Redis (2)
RedisResource.cs (2)
22PasswordParameter = password; 95PasswordParameter = password;
33 references to PasswordParameter
Aspire.Hosting.Azure.Redis (4)
AzureRedisCacheResource.cs (2)
89InnerResource is not null && InnerResource.PasswordParameter is not null ? 90ReferenceExpression.Create($"{InnerResource.PasswordParameter}") :
AzureRedisEnterpriseResource.cs (2)
94InnerResource is not null && InnerResource.PasswordParameter is not null ? 95ReferenceExpression.Create($"{InnerResource.PasswordParameter}") :
Aspire.Hosting.Azure.Tests (8)
AzureRedisEnterpriseExtensionsTests.cs (3)
64Assert.NotNull(redisResource?.PasswordParameter); 65Assert.Equal($"localhost:12455,password={await redisResource.PasswordParameter.GetValueAsync(CancellationToken.None)}", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 98Assert.NotNull(redisResource?.PasswordParameter);
AzureRedisExtensionsTests.cs (5)
105Assert.NotNull(redisResource?.PasswordParameter); 107Assert.Equal($"localhost:12455,password={redisResource.PasswordParameter.Value}", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 141Assert.NotNull(redisResource?.PasswordParameter); 244Assert.NotNull(redis.Resource.PasswordParameter); 247Assert.Equal($"localhost:12455,password={redis.Resource.PasswordParameter.Value}", await redis.Resource.GetConnectionStringAsync());
Aspire.Hosting.Redis (12)
RedisBuilderExtensions.cs (6)
96if (redis.PasswordParameter is { } password) 108if (redis.PasswordParameter is not null) 178if (redisInstance.PasswordParameter is not null) 180var password = await redisInstance.PasswordParameter.GetValueAsync(ct).ConfigureAwait(false); 244if (redisInstance.PasswordParameter is not null) 246context.EnvironmentVariables[$"RI_REDIS_PASSWORD{counter}"] = redisInstance.PasswordParameter;
RedisResource.cs (6)
54if (PasswordParameter is not null) 56builder.Append($",password={PasswordParameter}"); 111if (PasswordParameter is not null) 113builder.Append($":{PasswordParameter:uri}@"); 129if (PasswordParameter is not null) 131yield return new("Password", ReferenceExpression.Create($"{PasswordParameter}"));
Aspire.Hosting.Redis.Tests (5)
AddRedisTests.cs (5)
325Assert.Equal(redis1.Resource.PasswordParameter!.Value, item.Value); 347Assert.Equal(redis2.Resource.PasswordParameter!.Value, item.Value); 504Assert.Equal($"myredis1:{redis.Resource.Name}:6379:0:{redis.Resource.PasswordParameter?.Value}", config["REDIS_HOSTS"]); 551Assert.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)
1474Assert.Equal($"localhost:1234,password={redis.Resource.PasswordParameter?.Value}", env.Value); 1483Assert.Equal($"localhost:6379,password={redisNoPort.Resource.PasswordParameter?.Value}", otherRedisEnv.Value); 1532Assert.Equal($"localhost:1234,password={redis.Resource.PasswordParameter!.Value}", env.Value); 1541Assert.Equal($"localhost:6379,password={redisNoPort.Resource.PasswordParameter!.Value}", otherRedisEnv.Value);