810 references to Create
Aspire.Hosting (35)
Dcp\ExecutableConfigurationResolver.cs (6)
72CertificateBundlePath = ReferenceExpression.Create($"{bundleOutputPath}"),
73CertificateDirectoriesPath = ReferenceExpression.Create($"{string.Join(Path.PathSeparator, directories)}"),
79CertificatePath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.crt")}"),
80KeyPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.key")}"),
81CertificateWithKeyPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.pem")}"),
82PfxPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.pfx")}"),
Aspire.Hosting.Azure.ApiManagement (4)
Aspire.Hosting.Azure.AppConfiguration (2)
Aspire.Hosting.Azure.AppContainers (13)
Aspire.Hosting.Azure.ApplicationInsights (1)
Aspire.Hosting.Azure.AppService (11)
Aspire.Hosting.Azure.CognitiveServices (4)
Aspire.Hosting.Azure.ContainerRegistry (2)
Aspire.Hosting.Azure.CosmosDB (11)
Aspire.Hosting.Azure.EntraId (4)
Aspire.Hosting.Azure.EntraId.Tests (3)
Aspire.Hosting.Azure.EventHubs (8)
Aspire.Hosting.Azure.Functions (10)
Aspire.Hosting.Azure.KeyVault (4)
Aspire.Hosting.Azure.Kubernetes (6)
Aspire.Hosting.Azure.Kubernetes.Tests (5)
Aspire.Hosting.Azure.Kusto (6)
Aspire.Hosting.Azure.Network (3)
Aspire.Hosting.Azure.PostgreSQL (22)
Aspire.Hosting.Azure.Provisioning.Tests (2)
Aspire.Hosting.Azure.Redis (16)
Aspire.Hosting.Azure.Sandboxes (1)
Aspire.Hosting.Azure.Search (2)
Aspire.Hosting.Azure.ServiceBus (10)
Aspire.Hosting.Azure.SignalR (4)
Aspire.Hosting.Azure.Sql (12)
Aspire.Hosting.Azure.Storage (14)
Aspire.Hosting.Azure.Tests (81)
AzureApiManagementTests.cs (23)
300apim.AddBackend("declared-backend", ReferenceExpression.Create($"https://example.com"), backendName: "catalog_apiBackend");
368var backend = apim.AddBackend("backend", ReferenceExpression.Create($"https://example.com"));
391var backend = apim.AddBackend("backend", ReferenceExpression.Create($"https://example.com"));
893var backend = apim.AddBackend("catalog-backend", ReferenceExpression.Create($"https://example.com"));
946var backend = apim.AddBackend("backend", ReferenceExpression.Create($"https://example.com"));
969var backend = apim.AddBackend("backend", ReferenceExpression.Create($"https://example.com"));
1004var backend = apim.AddBackend("catalog-backend", ReferenceExpression.Create($"https://example.com"));
1737ReferenceExpression.Create($"https://example.com"),
2200ReferenceExpression.Create($"https://example.com"),
2231apim.AddBackend("backend", ReferenceExpression.Create($"https://example.com"), new()
2259apim.AddBackend("backend", ReferenceExpression.Create($"https://example.com"), new() { CircuitBreaker = new() }));
2363var backend = apim.AddBackend("catalog-backend", ReferenceExpression.Create($"https://example.com"));
2416var backend = apim.AddBackend("catalog-backend", ReferenceExpression.Create($"https://example.com"), new()
2520var backend = apim.AddBackend("catalog-backend", ReferenceExpression.Create($"https://example.com"), new()
2629var backend = apim.AddBackend("catalog-backend", ReferenceExpression.Create($"https://example.com"), new()
2657ReferenceExpression.Create($"https://example.com"),
2689ReferenceExpression.Create($"https://example.com"),
2825ReferenceExpression.Create($"https://example.com/base"),
2868ReferenceExpression.Create($"https://storage.example.com"),
2875ReferenceExpression.Create($"https://cognitive.example.com"),
2899ReferenceExpression.Create($"https://example.com"),
2906ReferenceExpression.Create($"https://example.com"),
2916ReferenceExpression.Create($"https://example.com"),
Aspire.Hosting.Azure.WebPubSub (8)
Aspire.Hosting.CodeGeneration.Go.Tests (1)
Aspire.Hosting.CodeGeneration.Java.Tests (1)
Aspire.Hosting.CodeGeneration.Python.Tests (1)
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
Aspire.Hosting.Containers.Tests (1)
Aspire.Hosting.Docker (3)
Aspire.Hosting.Docker.Tests (8)
DockerComposePublisherTests.cs (8)
187.WithEnvironment("CONFIG", ReferenceExpression.Create($"origin={origin}"));
219var cs = builder.AddConnectionString("cs", ReferenceExpression.Create($"Url={param0}, Secret={param1}"));
301var connection = builder.AddConnectionString("my-db", ReferenceExpression.Create($"Host=example"));
1429ReferenceExpression.Create($",ssl=true"),
1437ReferenceExpression.Create($",ssl=true"),
1438ReferenceExpression.Create($",ssl=false"));
1471ReferenceExpression.Create($",ssl=true"),
1472ReferenceExpression.Create($",ssl=false"));
Aspire.Hosting.EntityFrameworkCore.Tests (3)
Aspire.Hosting.Foundry (30)
Aspire.Hosting.Foundry.Tests (13)
Aspire.Hosting.Garnet (3)
Aspire.Hosting.Go (1)
Aspire.Hosting.Go.Tests (2)
Aspire.Hosting.Java (2)
Aspire.Hosting.Java.Tests (2)
Aspire.Hosting.JavaScript (2)
Aspire.Hosting.JavaScript.Tests (46)
AddViteAppTests.cs (36)
576CertificatePath = ReferenceExpression.Create($"cert.pem"),
577KeyPath = ReferenceExpression.Create($"key.pem"),
578CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
579PfxPath = ReferenceExpression.Create($"cert.pfx"),
636CertificatePath = ReferenceExpression.Create($"cert.pem"),
637KeyPath = ReferenceExpression.Create($"key.pem"),
638CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
639PfxPath = ReferenceExpression.Create($"cert.pfx"),
688CertificatePath = ReferenceExpression.Create($"cert.pem"),
689KeyPath = ReferenceExpression.Create($"key.pem"),
690CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
691PfxPath = ReferenceExpression.Create($"cert.pfx"),
734CertificatePath = ReferenceExpression.Create($"cert.pem"),
735KeyPath = ReferenceExpression.Create($"key.pem"),
736CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
737PfxPath = ReferenceExpression.Create($"cert.pfx"),
786CertificatePath = ReferenceExpression.Create($"cert.pem"),
787KeyPath = ReferenceExpression.Create($"key.pem"),
788CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
789PfxPath = ReferenceExpression.Create($"cert.pfx"),
845CertificatePath = ReferenceExpression.Create($"cert.pem"),
846KeyPath = ReferenceExpression.Create($"key.pem"),
847CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
848PfxPath = ReferenceExpression.Create($"cert.pfx"),
918CertificatePath = ReferenceExpression.Create($"cert.pem"),
919KeyPath = ReferenceExpression.Create($"key.pem"),
920CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
921PfxPath = ReferenceExpression.Create($"cert.pfx"),
1023CertificatePath = ReferenceExpression.Create($"cert.pem"),
1024KeyPath = ReferenceExpression.Create($"key.pem"),
1025CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
1026PfxPath = ReferenceExpression.Create($"cert.pfx"),
1144CertificatePath = ReferenceExpression.Create($"cert.pem"),
1145KeyPath = ReferenceExpression.Create($"key.pem"),
1146CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
1147PfxPath = ReferenceExpression.Create($"cert.pfx"),
Aspire.Hosting.Kafka (7)
Aspire.Hosting.Keycloak (2)
Aspire.Hosting.Kubernetes (42)
Aspire.Hosting.Kubernetes.Tests (27)
KubernetesPublisherTests.cs (24)
64.WithEnvironment("CONFIG", ReferenceExpression.Create($"origins={origin}"))
65.WithEnvironment("SECRET_CONFIG", ReferenceExpression.Create($"origins={origin};json={json};token={token}"))
67.WithEnvironment("UNICODE_CONFIG", ReferenceExpression.Create($"\U0001F680{origin}"))
68.WithEnvironment("UNICODE_SECRET", ReferenceExpression.Create($"\U0001F680{token}"))
380.WithEnvironment("CONFIG", ReferenceExpression.Create($"origin={origin}"));
453var cs = builder.AddConnectionString("cs", ReferenceExpression.Create($"Url={param0}, Secret={param1}"));
746var cs = builder.AddConnectionString("api-cs", ReferenceExpression.Create($"Url={param0}, Secret={param1}"));
747var csPlain = builder.AddConnectionString("api-cs2", ReferenceExpression.Create($"host.local:80"));
748var manualAlias = builder.AddConnectionString("manual-db", ReferenceExpression.Create($"unused"));
1372var output = ReferenceExpression.Create($"{new TestValueProvider("provisioned-value")}");
1374repositoryOutput ? ReferenceExpression.Create($"registry.example.com") : output,
1813ReferenceExpression.Create($"enabled"),
1814ReferenceExpression.Create($"disabled"));
1818ReferenceExpression.Create($"enabled"),
1819ReferenceExpression.Create($"disabled"));
1935ReferenceExpression.Create($",ssl=true"),
1943ReferenceExpression.Create($",ssl=true"),
1944ReferenceExpression.Create($",ssl=false"));
2000ReferenceExpression.Create($"user={user};password={password}"),
2001ReferenceExpression.Create($"user={user};disabled"));
2050ReferenceExpression.Create($",ssl=true"),
2051ReferenceExpression.Create($",ssl=false"));
2141ReferenceExpression.Create($"{tlsSuffix.Resource}"),
2142ReferenceExpression.Create($",ssl=false"));
Aspire.Hosting.Milvus (8)
Aspire.Hosting.MongoDB (17)
Aspire.Hosting.MongoDB.Tests (5)
Aspire.Hosting.MySql (7)
Aspire.Hosting.Nats (5)
Aspire.Hosting.OpenAI (5)
Aspire.Hosting.Oracle (7)
Aspire.Hosting.Orleans.Tests (1)
Aspire.Hosting.PostgreSQL (9)
Aspire.Hosting.Qdrant (9)
Aspire.Hosting.RabbitMQ (5)
Aspire.Hosting.Radius (9)
Aspire.Hosting.Radius.Tests (34)
Publishing\BackingResourceValueResolutionTests.cs (32)
458ReferenceExpression.Create($"primary"),
459ReferenceExpression.Create($"secondary")))
487ReferenceExpression.Create($"primary"),
488ReferenceExpression.Create($"secondary")))));
506ReferenceExpression.Create($"primary"),
507ReferenceExpression.Create($"secondary")))
532ReferenceExpression.Create($"primary"),
533ReferenceExpression.Create($"secondary")));
552ReferenceExpression.Create($"{mode.Resource}"),
554ReferenceExpression.Create($"primary"),
555ReferenceExpression.Create($"secondary")));
572ReferenceExpression.Create($"{new ThrowingDeploymentOutput(new InvalidOperationException("not deployed yet"))}"),
574ReferenceExpression.Create($"primary"),
575ReferenceExpression.Create($"secondary")))
600ReferenceExpression.Create($"primary"),
601ReferenceExpression.Create($"secondary")));
627ReferenceExpression.Create($"primary"),
628ReferenceExpression.Create($"secondary")));
649ReferenceExpression.Create($"primary"),
650ReferenceExpression.Create($"secondary")),
652ReferenceExpression.Create($"primary"),
653ReferenceExpression.Create($"secondary")))
1013.WithEnvironment("ADMIN_PASSWORD", ReferenceExpression.Create($"{shared}"));
1090.WithEnvironment("DB_PRIMARY_PASSWORD", ReferenceExpression.Create($"{shared}"));
1194.WithEnvironment("PORT_URL", ReferenceExpression.Create($"tcp://cache:{port:uri}/"));
1217ReferenceExpression.Create($"primary-{cache.GetEndpoint("tcp").Property(EndpointProperty.Host)}"),
1218ReferenceExpression.Create($"secondary-fallback"));
1355.WithEnvironment("TOKEN", ReferenceExpression.Create($"{token:json}"));
1405new("username", ReferenceExpression.Create($"app")),
1406new("password", ReferenceExpression.Create($"{unresolvable}")),
1454ConnectionStringExpression = ReferenceExpression.Create($"{inner};{new ConnectionStringReference(this, false)}");
1507public ReferenceExpression ConnectionStringExpression => ReferenceExpression.Create($"Host=pg");
Aspire.Hosting.Redis (4)
Aspire.Hosting.RemoteHost.Tests (8)
Aspire.Hosting.Seq (4)
Aspire.Hosting.SqlServer (10)
Aspire.Hosting.Tests (152)
ConditionalReferenceExpressionTests.cs (19)
19var whenTrue = ReferenceExpression.Create($",ssl=true");
32var whenTrue = ReferenceExpression.Create($",ssl=true");
45var whenTrue = ReferenceExpression.Create($",ssl=true");
58var whenTrue = ReferenceExpression.Create($",ssl=true");
87var whenTrue = ReferenceExpression.Create($",ssl=true");
111ReferenceExpression.Create($"https://{publicHost}/signin-oidc"),
112ReferenceExpression.Create($"http://{publicHost}/fallback"));
115.WithEnvironment("COMPOSITE", ReferenceExpression.Create($"redirect={expression}"));
133ReferenceExpression.Create($"https://{publicHost}"), ReferenceExpression.Empty);
150ReferenceExpression.Create($"https://{publicHost}"), ReferenceExpression.Empty);
153infrastructure.Resource.Parameters["origin"] = ReferenceExpression.Create($"origin={expression}");
169ReferenceExpression.Create($"selected-true"), ReferenceExpression.Create($"selected-false"));
186ReferenceExpression.Create($"https://public.example/{path:uri}"), ReferenceExpression.Empty);
188.WithEnvironment("PATH", ReferenceExpression.Create($"{path:uri}"))
205ReferenceExpression.Create($"unused-true"), ReferenceExpression.Create($"unused-false"));
207unselected, ReferenceExpression.Create($"https://{publicHost}"));
209ReferenceExpression.Create($"{selected}/signin-oidc"), unselected);
ConnectionPropertiesExtensionsTests.cs (5)
16new KeyValuePair<string, ReferenceExpression>("Host", ReferenceExpression.Create($"resourceHost")),
17new KeyValuePair<string, ReferenceExpression>("Port", ReferenceExpression.Create($"8080")),
22new KeyValuePair<string, ReferenceExpression>("Port", ReferenceExpression.Create($"9090")),
23new KeyValuePair<string, ReferenceExpression>("Username", ReferenceExpression.Create($"user")),
44public ReferenceExpression ConnectionStringExpression { get; } = ReferenceExpression.Create($"{name}.connectionString");
ExpressionResolverTests.cs (11)
356ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
380{ "TwoFullEndpoints", ReferenceExpression.Create($"Test1={Endpoint1.Property(EndpointProperty.Scheme)}://{Endpoint1.Property(EndpointProperty.IPV4Host)}:{Endpoint1.Property(EndpointProperty.Port)}/;Test2={Endpoint2.Property(EndpointProperty.Scheme)}://{Endpoint2.Property(EndpointProperty.Host)}:{Endpoint2.Property(EndpointProperty.Port)}/;") },
381{ "Url", ReferenceExpression.Create($"Url={Endpoint1.Property(EndpointProperty.Url)};") },
382{ "Url2", ReferenceExpression.Create($"Url={Endpoint1};") },
383{ "OnlyHost", ReferenceExpression.Create($"Host={Endpoint1.Property(EndpointProperty.Host)};") },
384{ "OnlyPort", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};") },
385{ "HostAndPort", ReferenceExpression.Create($"HostPort={Endpoint1.Property(EndpointProperty.HostAndPort)}") },
386{ "PortBeforeHost", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};Host={Endpoint1.Property(EndpointProperty.Host)};") },
387{ "FullAndPartial", ReferenceExpression.Create($"Test1={Endpoint1.Property(EndpointProperty.Scheme)}://{Endpoint1.Property(EndpointProperty.IPV4Host)}:{Endpoint1.Property(EndpointProperty.Port)}/;Test2={Endpoint2.Property(EndpointProperty.Scheme)}://localhost:{Endpoint2.Property(EndpointProperty.Port)}/;") },
389{ "String", ReferenceExpression.Create($"String") },
392{ "UrlEncodedHost", ReferenceExpression.Create($"Host={Endpoint3.Property(EndpointProperty.Host):uri};") },
ManifestExpressionTests.cs (33)
168ReferenceExpression.Create($"https://{publicHost}?tls={tls}"), ReferenceExpression.Empty);
195.WithEnvironment("URL", ReferenceExpression.Create($"https://{publicHost}/{custom}"));
221bool.TrueString, ReferenceExpression.Create($"{first}|{second}|{first}"), ReferenceExpression.Empty);
248? ReferenceExpression.Create($"{second:uri}|{first}|{second}")
249: ReferenceExpression.Create($"{first}|{second:uri}|{first}");
341.WithEnvironment("URL", ReferenceExpression.Create($"https://public.example/{literal:uri}"));
360bool.TrueString, ReferenceExpression.Create($"{wrapper:uri}"), ReferenceExpression.Empty);
386bool.TrueString, ReferenceExpression.Create($"https://{host}/{custom}"), inactive);
389builder.AddContainer("backend", "image").WithEnvironment("ENCODED", ReferenceExpression.Create($"{wrapper:uri}"));
410ReferenceExpression.Create($"{frontend.GetEndpoint("HTTP").Property(property)}"),
411ReferenceExpression.Create($"unused"));
414.WithEnvironment("COMPOSITE", ReferenceExpression.Create($"prefix/{origin}/suffix"))
417.WithEnvironment("ENCODED", ReferenceExpression.Create($"{origin:uri}"))
440module.Resource.Parameters["redirect"] = () => ReferenceExpression.Create($"{origin}/signin-oidc");
472var origin = ReferenceExpression.Create($"{frontend.GetEndpoint("http").Property(EndpointProperty.BrowserOrigins)}");
473var deployed = ReferenceExpression.Create($"https://deployed.example");
498ReferenceExpression.Create($"nested-true"), ReferenceExpression.Create($"nested-false"));
501nested, ReferenceExpression.Create($"{selectedValue}"));
520builder.AddContainer("backend", "image").WithEnvironment("ENCODED", ReferenceExpression.Create($"{wrapper:uri}"));
541? ReferenceExpression.Create($"https://example/?q={wrapper:uri}")
542: ReferenceExpression.Create($"https://example/?q={query:uri}");
546bool.FalseString, inner, ReferenceExpression.Create($"{inactive}"));
549builder.AddContainer("backend", "image").WithEnvironment("ENCODED", ReferenceExpression.Create($"{browser:uri}"));
569var inner = ReferenceExpression.Create($"https://example/?q={concrete:uri}");
572builder.AddContainer("backend", "image").WithEnvironment("ENCODED", ReferenceExpression.Create($"{browser:uri}"));
590builder.AddContainer("backend", "image").WithEnvironment("ENCODED", ReferenceExpression.Create($"{opaque:uri}"));
607ReferenceExpression.Create($"https://login.example/?redirect_uri={web.GetEndpoint("https"):uri}"));
628ReferenceExpression.Create($"https://{host}/{custom}"), ReferenceExpression.Create($"{inactive}"));
649ReferenceExpression.Create($"unused-true"), ReferenceExpression.Create($"unused-false"));
721ReferenceExpression.Create($"selected"), ReferenceExpression.Empty);
Aspire.Hosting.Valkey (3)
Aspire.Hosting.Yarp.Tests (1)
AzureApiManagementOpenAI.AppHost (2)
ParameterEndToEnd.AppHost (1)
TestingAppHost1.AppHost (1)