3 instantiations of ReferenceExpression
Aspire.Hosting (3)
1469 references to ReferenceExpression
Aspire.Hosting (176)
ApplicationModel\ReferenceExpression.cs (31)
18/// A <see cref="ReferenceExpression"/> operates in one of two modes:
37public static readonly ReferenceExpression Empty = Create(string.Empty, [], [], []);
43private readonly ReferenceExpression? _whenTrue;
44private readonly ReferenceExpression? _whenFalse;
60private ReferenceExpression(IValueProvider condition, string matchValue, ReferenceExpression whenTrue, ReferenceExpression whenFalse)
118public ReferenceExpression? WhenTrue => _whenTrue;
124public ReferenceExpression? WhenFalse => _whenFalse;
194var branch = string.Equals(conditionValue, _matchValue, StringComparison.OrdinalIgnoreCase) ? _whenTrue! : _whenFalse!;
230internal static ReferenceExpression Create(string format, IValueProvider[] valueProviders, string[] manifestExpressions, string?[] stringFormats)
236/// Creates a new instance of <see cref="ReferenceExpression"/> with the specified format and value providers.
239/// <returns>A new instance of <see cref="ReferenceExpression"/> with the specified format and value providers.</returns>
240public static ReferenceExpression Create(in ExpressionInterpolatedStringHandler handler)
246/// Creates a conditional <see cref="ReferenceExpression"/> that selects between two branch expressions
255/// <returns>A new conditional <see cref="ReferenceExpression"/>.</returns>
256public static ReferenceExpression CreateConditional(IValueProvider condition, string matchValue, ReferenceExpression whenTrue, ReferenceExpression whenFalse)
261private static string GenerateConditionalName(IValueProvider condition, string matchValue, ReferenceExpression whenTrue, ReferenceExpression whenFalse)
280private static string ComputeConditionalHash(IValueProvider condition, ReferenceExpression whenTrue, ReferenceExpression whenFalse, string matchValue)
387public void AppendFormatted(ReferenceExpression valueProvider, string format)
436internal readonly ReferenceExpression GetExpression() =>
482/// A builder for creating <see cref="ReferenceExpression"/> instances.
561public void AppendFormatted(ReferenceExpression valueProvider, string format)
616/// Builds the <see cref="ReferenceExpression"/>.
620public ReferenceExpression Build() =>
621ReferenceExpression.Create(_builder.ToString(), [.. _valueProviders], [.. _manifestExpressions], [.. _stringFormats]);
629/// <param name="builder">The builder that will be used to create the <see cref="ReferenceExpression"/>.</param>
670public void AppendFormatted(ReferenceExpression valueProvider, string format)
Dcp\ExecutableConfigurationResolver.cs (6)
71CertificateBundlePath = ReferenceExpression.Create($"{bundleOutputPath}"),
72CertificateDirectoriesPath = ReferenceExpression.Create($"{string.Join(Path.PathSeparator, directories)}"),
78CertificatePath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.crt")}"),
79KeyPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.key")}"),
80CertificateWithKeyPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.pem")}"),
81PfxPath = ReferenceExpression.Create($"{Path.Join(baseServerAuthOutputPath, $"{certificate.Thumbprint}.pfx")}"),
ResourceBuilderExtensions.cs (18)
245typeof(ReferenceExpression),
261ReferenceExpression expression => builder.WithEnvironment(name, expression),
284public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, in ReferenceExpression.ExpressionInterpolatedStringHandler value)
290var expression = value.GetExpression();
324public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value)
601public static IResourceBuilder<T> WithConnectionProperty<T>(this IResourceBuilder<T> builder, string name, ReferenceExpression value) where T : IResourceWithConnectionString
624return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, ReferenceExpression.Create($"{value}")));
639[AspireUnion(typeof(string), typeof(ReferenceExpression))] object value) where T : IResourceWithConnectionString
648ReferenceExpression referenceExpression => builder.WithConnectionProperty(name, referenceExpression),
1169public static ReferenceExpression GetConnectionProperty(this IResourceWithConnectionString resource, string key)
1179return ReferenceExpression.Empty;
2073[AspireUnion(typeof(string), typeof(ReferenceExpression))] object url,
2083ReferenceExpression expression => builder.WithUrl(expression, displayText),
2102public static IResourceBuilder<T> WithUrl<T>(this IResourceBuilder<T> builder, in ReferenceExpression.ExpressionInterpolatedStringHandler url, string? displayText = null)
2107var expression = url.GetExpression();
2117/// <param name="url">A <see cref="ReferenceExpression"/> that will produce the URL.</param>
2125public static IResourceBuilder<T> WithUrl<T>(this IResourceBuilder<T> builder, ReferenceExpression url, string? displayText = null)
4500ReferenceExpression expression) where T : IResource
Aspire.Hosting.Azure (13)
Aspire.Hosting.Azure.AppConfiguration (3)
Aspire.Hosting.Azure.AppContainers (24)
Aspire.Hosting.Azure.ApplicationInsights (2)
Aspire.Hosting.Azure.AppService (24)
Aspire.Hosting.Azure.CognitiveServices (10)
Aspire.Hosting.Azure.ContainerRegistry (4)
Aspire.Hosting.Azure.CosmosDB (22)
Aspire.Hosting.Azure.EventHubs (18)
Aspire.Hosting.Azure.FrontDoor (5)
Aspire.Hosting.Azure.Functions (17)
Aspire.Hosting.Azure.KeyVault (11)
AzureKeyVaultResourceExtensions.cs (4)
267[AspireUnion(typeof(IResourceBuilder<ParameterResource>), typeof(ReferenceExpression))] object value,
278ReferenceExpression expression => builder.AddSecret(name, secretName, expression),
312public static IResourceBuilder<AzureKeyVaultSecretResource> AddSecret(this IResourceBuilder<AzureKeyVaultResource> builder, string name, ReferenceExpression value)
373public static IResourceBuilder<AzureKeyVaultSecretResource> AddSecret(this IResourceBuilder<AzureKeyVaultResource> builder, [ResourceName] string name, string secretName, ReferenceExpression value)
Aspire.Hosting.Azure.Kubernetes (6)
Aspire.Hosting.Azure.Kubernetes.Tests (4)
Aspire.Hosting.Azure.Kusto (11)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Network (15)
Aspire.Hosting.Azure.PostgreSQL (39)
Aspire.Hosting.Azure.Redis (26)
Aspire.Hosting.Azure.Search (5)
Aspire.Hosting.Azure.ServiceBus (22)
Aspire.Hosting.Azure.SignalR (7)
Aspire.Hosting.Azure.Sql (26)
Aspire.Hosting.Azure.Storage (49)
Aspire.Hosting.Azure.Tests (95)
Aspire.Hosting.Azure.WebPubSub (14)
Aspire.Hosting.Blazor (2)
Aspire.Hosting.CodeGeneration.Go.Tests (3)
Aspire.Hosting.CodeGeneration.Java.Tests (3)
Aspire.Hosting.CodeGeneration.Python.Tests (3)
Aspire.Hosting.CodeGeneration.Rust.Tests (3)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (3)
Aspire.Hosting.Containers.Tests (2)
Aspire.Hosting.Docker (9)
Aspire.Hosting.Docker.Tests (14)
DockerComposePublisherTests.cs (13)
34var cs = builder.AddConnectionString("cs", ReferenceExpression.Create($"Url={param0}, Secret={param1}"));
1062var conditional = ReferenceExpression.CreateConditional(
1065ReferenceExpression.Create($",ssl=true"),
1066ReferenceExpression.Empty);
1070var conditionalFalse = ReferenceExpression.CreateConditional(
1073ReferenceExpression.Create($",ssl=true"),
1074ReferenceExpression.Create($",ssl=false"));
1104var conditional = ReferenceExpression.CreateConditional(
1107ReferenceExpression.Create($",ssl=true"),
1108ReferenceExpression.Create($",ssl=false"));
Aspire.Hosting.EntityFrameworkCore.Tests (6)
Aspire.Hosting.Foundry (43)
Aspire.Hosting.Foundry.Tests (2)
Aspire.Hosting.Garnet (7)
Aspire.Hosting.GitHub.Models (9)
Aspire.Hosting.Java (8)
Aspire.Hosting.Java.Tests (2)
Aspire.Hosting.JavaScript (5)
Aspire.Hosting.JavaScript.Tests (43)
AddViteAppTests.cs (37)
578CertificatePath = ReferenceExpression.Create($"cert.pem"),
579KeyPath = ReferenceExpression.Create($"key.pem"),
580CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
581PfxPath = ReferenceExpression.Create($"cert.pfx"),
600Assert.IsType<ReferenceExpression>(env["TLS_CONFIG_PFX"]);
638CertificatePath = ReferenceExpression.Create($"cert.pem"),
639KeyPath = ReferenceExpression.Create($"key.pem"),
640CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
641PfxPath = ReferenceExpression.Create($"cert.pfx"),
690CertificatePath = ReferenceExpression.Create($"cert.pem"),
691KeyPath = ReferenceExpression.Create($"key.pem"),
692CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
693PfxPath = ReferenceExpression.Create($"cert.pfx"),
736CertificatePath = ReferenceExpression.Create($"cert.pem"),
737KeyPath = ReferenceExpression.Create($"key.pem"),
738CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
739PfxPath = ReferenceExpression.Create($"cert.pfx"),
788CertificatePath = ReferenceExpression.Create($"cert.pem"),
789KeyPath = ReferenceExpression.Create($"key.pem"),
790CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
791PfxPath = ReferenceExpression.Create($"cert.pfx"),
847CertificatePath = ReferenceExpression.Create($"cert.pem"),
848KeyPath = ReferenceExpression.Create($"key.pem"),
849CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
850PfxPath = ReferenceExpression.Create($"cert.pfx"),
920CertificatePath = ReferenceExpression.Create($"cert.pem"),
921KeyPath = ReferenceExpression.Create($"key.pem"),
922CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
923PfxPath = ReferenceExpression.Create($"cert.pfx"),
1025CertificatePath = ReferenceExpression.Create($"cert.pem"),
1026KeyPath = ReferenceExpression.Create($"key.pem"),
1027CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
1028PfxPath = ReferenceExpression.Create($"cert.pfx"),
1116CertificatePath = ReferenceExpression.Create($"cert.pem"),
1117KeyPath = ReferenceExpression.Create($"key.pem"),
1118CertificateWithKeyPath = ReferenceExpression.Create($"cert-with-key.pem"),
1119PfxPath = ReferenceExpression.Create($"cert.pfx"),
Aspire.Hosting.Kafka (11)
Aspire.Hosting.Keycloak (3)
Aspire.Hosting.Kubernetes (110)
KubernetesEnvironmentResource.cs (17)
206internal sealed record TlsSecretRequest(ReferenceExpression SecretName, ReferenceExpression Hostname, IResource Owner);
398public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference)
402return ReferenceExpression.Create($"{resource.Name.ToServiceName()}");
585/// Resolves a <see cref="ReferenceExpression"/> at deploy time. Used by pipeline steps
590private static async Task<string> ResolveExpressionAtDeployTimeAsync(ReferenceExpression expression, CancellationToken cancellationToken)
603/// Resolves a <see cref="ReferenceExpression"/> for inclusion in a Kubernetes manifest
617private async Task<string> ResolveExpressionAsync(ReferenceExpression expression, string owningResourceName, CancellationToken cancellationToken)
701IEnumerable<ReferenceExpression> hostnames,
707foreach (var hostname in hostnames)
1285foreach (var host in gateway.Hostnames)
1300foreach (var host in ingress.Hostnames)
1330private static List<(KubernetesGatewayResource Gateway, ReferenceExpression SecretName)> CollectGatewaysNeedingFqdnDiscovery(
1334var results = new List<(KubernetesGatewayResource Gateway, ReferenceExpression SecretName)>();
1388List<(KubernetesGatewayResource Gateway, ReferenceExpression SecretName)> gatewaysNeedingDiscovery)
2163var seen = new HashSet<(ReferenceExpression SecretName, ReferenceExpression Hostname)>();
KubernetesResource.cs (7)
529ep, [kubernetesEnvironmentResource, kubernetesEnvironmentResource.OwningComputeEnvironment], out var crossExpr))
572epExpr, [kubernetesEnvironmentResource, kubernetesEnvironmentResource.OwningComputeEnvironment], out var crossExpr))
589if (value is ReferenceExpression expr)
604var branch = string.Equals(conditionStr, expr.MatchValue, StringComparison.OrdinalIgnoreCase)
643private async Task<object> BuildHelmConditional(KubernetesEnvironmentContext context, DistributedApplicationExecutionContext executionContext, ReferenceExpression expr, ParameterResource conditionParam, bool embedded)
692private void AllocateBranchParameters(ReferenceExpression branch)
858ReferenceExpression expr => expr.ValueProviders.Any(IsUnresolvedAtPublishTime),
Aspire.Hosting.Kubernetes.Tests (34)
KubernetesPublisherTests.cs (28)
31var cs = builder.AddConnectionString("cs", ReferenceExpression.Create($"Url={param0}, Secret={param1}"));
261var cs = builder.AddConnectionString("api-cs", ReferenceExpression.Create($"Url={param0}, Secret={param1}"));
262var csPlain = builder.AddConnectionString("api-cs2", ReferenceExpression.Create($"host.local:80"));
998context.EnvironmentVariables["FIRST"] = ReferenceExpression.CreateConditional(
1001ReferenceExpression.Create($"enabled"),
1002ReferenceExpression.Create($"disabled"));
1003context.EnvironmentVariables["SECOND"] = ReferenceExpression.CreateConditional(
1006ReferenceExpression.Create($"enabled"),
1007ReferenceExpression.Create($"disabled"));
1120var conditional = ReferenceExpression.CreateConditional(
1123ReferenceExpression.Create($",ssl=true"),
1124ReferenceExpression.Empty);
1128var conditionalFalse = ReferenceExpression.CreateConditional(
1131ReferenceExpression.Create($",ssl=true"),
1132ReferenceExpression.Create($",ssl=false"));
1185context.EnvironmentVariables["OPTIONS"] = ReferenceExpression.CreateConditional(
1188ReferenceExpression.Create($"user={user};password={password}"),
1189ReferenceExpression.Create($"user={user};disabled"));
1235var conditional = ReferenceExpression.CreateConditional(
1238ReferenceExpression.Create($",ssl=true"),
1239ReferenceExpression.Create($",ssl=false"));
1300var conditional = ReferenceExpression.CreateConditional(
1303ReferenceExpression.Create($"{tlsSuffix.Resource}"),
1304ReferenceExpression.Create($",ssl=false"));
Aspire.Hosting.Milvus (14)
Aspire.Hosting.MongoDB (18)
Aspire.Hosting.MySql (18)
Aspire.Hosting.Nats (10)
Aspire.Hosting.OpenAI (11)
Aspire.Hosting.Oracle (18)
Aspire.Hosting.Orleans.Tests (2)
Aspire.Hosting.PostgreSQL (21)
Aspire.Hosting.Qdrant (14)
Aspire.Hosting.RabbitMQ (9)
Aspire.Hosting.Radius (18)
Aspire.Hosting.Radius.Tests (2)
Aspire.Hosting.Redis (9)
Aspire.Hosting.Redis.Tests (5)
Aspire.Hosting.RemoteHost.Tests (55)
AtsMarshallerTests.cs (40)
760var reference = Assert.Single(dto.AddressPrefixReferences);
1137public List<ReferenceExpression> AddressPrefixReferences { get; init; } = [];
1146var whenTrue = ReferenceExpression.Create($",ssl=true");
1147var whenFalse = ReferenceExpression.Empty;
1148var conditional = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
1165var whenTrue = ReferenceExpression.Create($",ssl=true");
1166var whenFalse = ReferenceExpression.Empty;
1167var conditional = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
1185var whenTrue = ReferenceExpression.Create($",ssl=true");
1186var whenFalse = ReferenceExpression.Empty;
1187var conditional = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
1192var retrievedConditional = Assert.IsType<ReferenceExpression>(retrieved);
1204var whenTrue = ReferenceExpression.Create($",ssl=true");
1205var whenFalse = ReferenceExpression.Empty;
1206var conditional = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
1211var retrievedConditional = Assert.IsType<ReferenceExpression>(retrieved);
1264var result = marshaller.UnmarshalFromJson(json, typeof(ReferenceExpression), context);
1265var cre = Assert.IsType<ReferenceExpression>(result);
1305var result = marshaller.UnmarshalFromJson(json, typeof(ReferenceExpression), context);
1306var cre = Assert.IsType<ReferenceExpression>(result);
1347var result = marshaller.UnmarshalFromJson(json, typeof(ReferenceExpression), context);
1348var cre = Assert.IsType<ReferenceExpression>(result);
1387marshaller.UnmarshalFromJson(json, typeof(ReferenceExpression), context));
ReferenceExpressionRefTests.cs (6)
118var expr = exprRef.ToReferenceExpression(handles, "test/cap", "param");
143var expr = exprRef.ToReferenceExpression(handles, "test/cap", "param");
180var expr = exprRef.ToReferenceExpression(handles, "test/cap", "param");
203var expr = exprRef.ToReferenceExpression(handles, "test/cap", "param");
233public ReferenceExpression ToReferenceExpression(HandleRegistry handles, string capabilityId, string paramName)
255return (ReferenceExpression)exprRef!.ToReferenceExpression(handles, capabilityId, paramName);
Aspire.Hosting.Seq (7)
Aspire.Hosting.SqlServer (22)
Aspire.Hosting.Tests (230)
ComputeEnvironmentEndpointResolverTests.cs (8)
24endpoint.Property(EndpointProperty.Url), [currentEnv.Resource], out var expression);
45endpoint, [currentEnv.Resource], out var expression);
63endpoint.Property(EndpointProperty.Url), [currentEnv.Resource], out var expression);
82endpoint.Property(EndpointProperty.Url), [currentEnv.Resource], out var expression);
99endpoint.Property(EndpointProperty.Url), [currentEnv.Resource], out var expression);
122endpoint.Property(EndpointProperty.Url), [currentEnv.Resource], out var expression);
160public ReferenceExpression GetHostAddressExpression(EndpointReference endpointReference) =>
161ReferenceExpression.Create($"{endpointReference.Resource.Name}.example.com");
ConditionalReferenceExpressionTests.cs (35)
14var whenTrue = ReferenceExpression.Create($",ssl=true");
15var whenFalse = ReferenceExpression.Empty;
17var expr = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
27var whenTrue = ReferenceExpression.Create($",ssl=true");
28var whenFalse = ReferenceExpression.Empty;
30var expr = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
40var whenTrue = ReferenceExpression.Create($",ssl=true");
41var whenFalse = ReferenceExpression.Empty;
43var expr = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
53var whenTrue = ReferenceExpression.Create($",ssl=true");
54var whenFalse = ReferenceExpression.Empty;
56var conditional = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
61var expression = builder.Build();
82var whenTrue = ReferenceExpression.Create($",ssl=true");
83var whenFalse = ReferenceExpression.Empty;
85var expr = ReferenceExpression.CreateConditional(condition, bool.TrueString, whenTrue, whenFalse);
94var expr = ReferenceExpression.CreateConditional(new TestValueProvider(bool.TrueString), bool.TrueString, ReferenceExpression.Empty, ReferenceExpression.Empty);
ConnectionPropertiesExtensionsTests.cs (14)
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")),
39private sealed class TestResource(string name, IEnumerable<KeyValuePair<string, ReferenceExpression>> properties)
42private readonly IReadOnlyList<KeyValuePair<string, ReferenceExpression>> _properties = new List<KeyValuePair<string, ReferenceExpression>>(properties);
44public ReferenceExpression ConnectionStringExpression { get; } = ReferenceExpression.Create($"{name}.connectionString");
46IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() => _properties;
ExpressionResolverTests.cs (17)
326public ReferenceExpression ConnectionStringExpression =>
327ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
344Dictionary<string, ReferenceExpression> Expressions { get; }
351{ "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)}/;") },
352{ "Url", ReferenceExpression.Create($"Url={Endpoint1.Property(EndpointProperty.Url)};") },
353{ "Url2", ReferenceExpression.Create($"Url={Endpoint1};") },
354{ "OnlyHost", ReferenceExpression.Create($"Host={Endpoint1.Property(EndpointProperty.Host)};") },
355{ "OnlyPort", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};") },
356{ "HostAndPort", ReferenceExpression.Create($"HostPort={Endpoint1.Property(EndpointProperty.HostAndPort)}") },
357{ "PortBeforeHost", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};Host={Endpoint1.Property(EndpointProperty.Host)};") },
358{ "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)}/;") },
359{ "Empty", ReferenceExpression.Empty },
360{ "String", ReferenceExpression.Create($"String") },
361{ "SecretParameter", ReferenceExpression.Create("SecretParameter", [new ParameterResource("SecretParameter", _ => "SecretParameter", secret: true)], [], [null]) },
362{ "NonSecretParameter", ReferenceExpression.Create("NonSecretParameter", [new ParameterResource("NonSecretParameter", _ => "NonSecretParameter", secret: false)], [], [null]) },
363{ "UrlEncodedHost", ReferenceExpression.Create($"Host={Endpoint3.Property(EndpointProperty.Host):uri};") },
367public ReferenceExpression ConnectionStringExpression => Expressions[_exprName];
ReferenceExpressionTests.cs (52)
19var refExpression = ReferenceExpression.Create($"Hello {input}");
37var expr = ReferenceExpression.Create($"{input}").ValueExpression;
48var expr = ReferenceExpression.Create($"{input}", [new HostUrl("test")], parameters, []).ValueExpression;
62var expr = ReferenceExpression.Create($"{input}", [new HostUrl("test")], [parameterValue], []).ValueExpression;
70var expr = ReferenceExpression.Create($"{s}").ValueExpression;
79var expr = ReferenceExpression.Create($"[{{\"api_uri\":\"{v}\"}}]");
90var expr = ReferenceExpression.Create($"[{{{{\"api_uri\":\"{v}\"}}}}]");
101var expr = ReferenceExpression.Create($"Text: {v:uri}");
143var whenTrue = ReferenceExpression.Create($"prefix-{param1}-{param2}");
144var whenFalse = ReferenceExpression.Create($"fallback-{param3}");
146var conditional = ReferenceExpression.CreateConditional(condition, "True", whenTrue, whenFalse);
160var whenTrue = ReferenceExpression.Create($"literal-a");
161var whenFalse = ReferenceExpression.Create($"literal-b");
163var conditional = ReferenceExpression.CreateConditional(condition, "True", whenTrue, whenFalse);
176var whenTrue = ReferenceExpression.Create($"{param1}");
177var whenFalse = ReferenceExpression.Create($"{param2}");
179var conditional = ReferenceExpression.CreateConditional(condition, "True", whenTrue, whenFalse);
199var innerConditional = ReferenceExpression.CreateConditional(
201ReferenceExpression.Create($"{param1}"),
202ReferenceExpression.Create($"{param2}"));
205var outerConditional = ReferenceExpression.CreateConditional(
208ReferenceExpression.Create($"{param3}"));
227var innerConditional = ReferenceExpression.CreateConditional(
229ReferenceExpression.Create($"{param1}"),
230ReferenceExpression.Create($"{param2}"));
232var outerConditional = ReferenceExpression.CreateConditional(
235ReferenceExpression.Create($"{param3}"));
256var conditional1 = ReferenceExpression.CreateConditional(
258ReferenceExpression.Create($"{param1}"),
259ReferenceExpression.Create($"{param2}"));
261var conditional2 = ReferenceExpression.CreateConditional(
263ReferenceExpression.Create($"{param1}"),
264ReferenceExpression.Create($"{param2}"));
Aspire.Hosting.Valkey (7)
Aspire.Hosting.Yarp.Tests (2)
ParameterEndToEnd.AppHost (1)
TestingAppHost1.AppHost (1)