12 implementations of ConnectionStringExpression
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
45public ReferenceExpression ConnectionStringExpression
Aspire.Hosting.Elasticsearch (1)
ElasticsearchResource.cs (1)
54public ReferenceExpression ConnectionStringExpression =>
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
41public ReferenceExpression ConnectionStringExpression =>
Aspire.Hosting.MongoDB (1)
MongoDBDatabaseResource.cs (1)
29public ReferenceExpression ConnectionStringExpression => Parent.BuildConnectionString(DatabaseName);
Aspire.Hosting.MySql (1)
MySqlServerResource.cs (1)
39public ReferenceExpression ConnectionStringExpression =>
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
39public ReferenceExpression ConnectionStringExpression =>
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
59public ReferenceExpression ConnectionStringExpression
Aspire.Hosting.Qdrant (1)
QdrantServerResource.cs (1)
46public ReferenceExpression ConnectionStringExpression =>
Aspire.Hosting.RabbitMQ (1)
RabbitMQServerResource.cs (1)
53public ReferenceExpression ConnectionStringExpression =>
Aspire.Hosting.SqlServer (2)
SqlServerDatabaseResource.cs (1)
19public ReferenceExpression ConnectionStringExpression =>
SqlServerServerResource.cs (1)
43public ReferenceExpression ConnectionStringExpression
Aspire.Hosting.Tests (1)
ExpressionResolverTests.cs (1)
143public ReferenceExpression ConnectionStringExpression => Expressions[_exprName];
26 references to ConnectionStringExpression
Aspire.Hosting (4)
ApplicationModel\ExpressionResolver.cs (1)
143IResourceWithConnectionString cs => await ResolveInternalAsync(cs.ConnectionStringExpression).ConfigureAwait(false),
ApplicationModel\IResourceWithConnectionString.cs (2)
17ConnectionStringExpression.GetValueAsync(cancellationToken); 33IEnumerable<object> IValueWithReferences.References => [ConnectionStringExpression];
Publishing\ManifestPublishingContext.cs (1)
379resourceWithConnectionString.ConnectionStringExpression is { } connectionString)
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (2)
638return await ProcessValueAsync(cs.Resource.ConnectionStringExpression, executionContext, cancellationToken, secretType: secretType, parent: parent).ConfigureAwait(false); 643return await ProcessValueAsync(csrs.ConnectionStringExpression, executionContext, cancellationToken, secretType: secretType, parent: parent).ConfigureAwait(false);
Aspire.Hosting.Azure.Tests (2)
AzureBicepResourceTests.cs (2)
1620Assert.Equal("{sb.outputs.serviceBusEndpoint}", connectionStringResource.ConnectionStringExpression.ValueExpression); 2529Assert.Equal("{search.outputs.connectionString}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Elasticsearch.Tests (1)
AddElasticsearchTests.cs (1)
153Assert.Equal("http://elastic:{elasticsearch-password.value}@{elasticsearch.bindings.http.host}:{elasticsearch.bindings.http.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Garnet.Tests (1)
AddGarnetTests.cs (1)
83Assert.Equal("{myGarnet.bindings.tcp.host}:{myGarnet.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Kafka.Tests (1)
AddKafkaTests.cs (1)
71Assert.Equal("{kafka.bindings.tcp.host}:{kafka.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.MongoDB.Tests (2)
AddMongoDBTests.cs (2)
92Assert.Equal("mongodb://admin:{mongodb-password.value}@{mongodb.bindings.tcp.host}:{mongodb.bindings.tcp.port}?authSource=admin&authMechanism=SCRAM-SHA-256", serverResource.ConnectionStringExpression.ValueExpression); 94Assert.Equal("mongodb://admin:{mongodb-password.value}@{mongodb.bindings.tcp.host}:{mongodb.bindings.tcp.port}/mydatabase?authSource=admin&authMechanism=SCRAM-SHA-256", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.MySql.Tests (1)
AddMySqlTests.cs (1)
127Assert.Equal("Server={mysql.bindings.tcp.host};Port={mysql.bindings.tcp.port};User ID=root;Password={mysql-password.value}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Nats.Tests (2)
AddNatsTests.cs (2)
55Assert.Equal("nats://nats:{nats-password.value}@{nats.bindings.tcp.host}:{nats.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 82Assert.Equal("nats://{user.value}:{pass.value}@{nats.bindings.tcp.host}:{nats.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Oracle.Tests (2)
AddOracleTests.cs (2)
126Assert.Equal("user id=system;password={orcl-password.value};data source={orcl.bindings.tcp.host}:{orcl.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 150Assert.Equal("{orcl.connectionString}/db", oracleDatabaseConnectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.PostgreSQL (1)
PostgresServerResource.cs (1)
65return connectionStringAnnotation.Resource.ConnectionStringExpression;
Aspire.Hosting.PostgreSQL.Tests (1)
AddPostgresTests.cs (1)
162Assert.Equal("Host={postgres.bindings.tcp.host};Port={postgres.bindings.tcp.port};Username=postgres;Password={postgres-password.value}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.RabbitMQ.Tests (1)
AddRabbitMQTests.cs (1)
111Assert.Equal("amqp://guest:{pass.value}@{rabbit.bindings.tcp.host}:{rabbit.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Redis (1)
RedisResource.cs (1)
34return connectionStringAnnotation.Resource.ConnectionStringExpression;
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
92Assert.Equal("{myRedis.bindings.tcp.host}:{myRedis.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.SqlServer (1)
SqlServerServerResource.cs (1)
49return connectionStringAnnotation.Resource.ConnectionStringExpression;
Aspire.Hosting.SqlServer.Tests (1)
AddSqlServerTests.cs (1)
122Assert.Equal("{sqlserver.connectionString};Database=mydb", connectionStringResource.ConnectionStringExpression.ValueExpression);
Aspire.Hosting.Valkey.Tests (1)
AddValkeyTests.cs (1)
83Assert.Equal("{myValkey.bindings.tcp.host}:{myValkey.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression);