328 references to Property
Aspire.Hosting (16)
ApplicationModel\EndpointReference.cs (5)
71public EndpointReferenceExpression BrowserOrigins => Property(EndpointProperty.BrowserOrigins); 87public EndpointReferenceExpression PrimaryBrowserOrigin => Property(EndpointProperty.PrimaryBrowserOrigin); 149public ValueTask<string?> GetValueAsync(CancellationToken cancellationToken = default) => Property(EndpointProperty.Url).GetValueAsync(cancellationToken); 158public ValueTask<string?> GetValueAsync(ValueProviderContext context, CancellationToken cancellationToken = default) => Property(EndpointProperty.Url).GetValueAsync(context, cancellationToken); 219Property(EndpointProperty.TlsEnabled),
ApplicationModel\HostUrl.cs (1)
84var port = await targetEndpoint.Property(EndpointProperty.Port).GetValueAsync(context, cancellationToken).ConfigureAwait(false);
Dashboard\DashboardEventHandlers.cs (4)
688ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 714aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (5)
1211context.EnvironmentVariables[KnownAspNetCoreConfigNames.HttpsPort] = e.Property(EndpointProperty.Port); 1216aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1263ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 1296var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
1984context.EnvironmentVariables[endpointAnnotation.TargetPortEnvironmentVariable!] = endpointReference.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.ApiManagement (3)
AzureApiManagementExtensions.cs (2)
2374endpoint.Property(EndpointProperty.Url)); 2448endpoint.Property(EndpointProperty.Url));
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
51? ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.Url)};Id=anonymous;Secret=abcdefghijklmnopqrstuvwxyz1234567890;Anonymous=True")
Aspire.Hosting.Azure.AppContainers (3)
BaseContainerAppContext.cs (2)
261var url = GetEndpointValue(mapping, ep.Property(EndpointProperty.Url)); 595Port = AsInt(GetEndpointValue(endpointMapping, endpointProbeAnnotation.EndpointReference.Property(EndpointProperty.TargetPort))),
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Azure.AppService (1)
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Azure.CosmosDB (4)
AzureCosmosDBEmulatorConnectionString.cs (3)
13? ReferenceExpression.Create($"AccountKey={CosmosConstants.EmulatorAccountKey};AccountEndpoint={endpoint.Property(EndpointProperty.Url)}") 14: ReferenceExpression.Create($"AccountKey={CosmosConstants.EmulatorAccountKey};AccountEndpoint=https://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)};DisableServerCertificateValidation=True;");
AzureCosmosDBResource.cs (1)
110ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") :
Aspire.Hosting.Azure.EntraId (3)
EntraIdResourceExtensions.cs (1)
1555var tlsEnabled = computeEnvironment.GetEndpointPropertyExpression(endpoint.Property(EndpointProperty.TlsEnabled));
EntraIdRunModeBrowserOrigin.cs (1)
33var allocatedUrl = await endpoint.Property(EndpointProperty.Url).GetValueAsync(context, cancellationToken).ConfigureAwait(false);
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Azure.EventHubs (5)
AzureEventHubsResource.cs (5)
69ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Host)}") : 81ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Port)}") : 92ReferenceExpression.Create($"sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)}") : 106builder.Append($"Endpoint=sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true"); 216yield return new("ConnectionString", ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true"));
Aspire.Hosting.Azure.FrontDoor (1)
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Azure.Functions (7)
AzureFunctionsProjectResourceExtensions.cs (3)
273context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.Property(EndpointProperty.TargetPort)}"); 408context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort)); 438context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
DurableTask\DurableTaskSchedulerResource.cs (4)
36return ReferenceExpression.Create($"Endpoint={grpcEndpoint.Property(EndpointProperty.Scheme)}://{grpcEndpoint.Property(EndpointProperty.Host)}:{grpcEndpoint.Property(EndpointProperty.Port)};Authentication=None"); 58return ReferenceExpression.Create($"{dashboardEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
59ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") : 75ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") :
Aspire.Hosting.Azure.Kubernetes.Tests (1)
AzureKubernetesFoundryReferenceTests.cs (1)
68.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url));
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerResource.cs (1)
93ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}") :
Aspire.Hosting.Azure.Redis (2)
AzureManagedRedisResource.cs (1)
101ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.Property(EndpointProperty.Host)}") :
AzureRedisCacheResource.cs (1)
82ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}") :
Aspire.Hosting.Azure.Sandboxes (3)
AzureSandboxContainerDeployment.cs (1)
1292return TryResolveEndpointReferenceValue(endpointReference.Property(EndpointProperty.Url), currentComputeEnvironment, out expression);
AzureSandboxGroupResource.cs (1)
294return GetEndpointPropertyExpression(endpointReference.Property(EndpointProperty.Host));
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Azure.ServiceBus (5)
AzureServiceBusExtensions.cs (1)
493context.EnvironmentVariables.TryAdd("SQL_SERVER", sqlConnection.Endpoint.Property(EndpointProperty.HostAndPort));
AzureServiceBusResource.cs (4)
59ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Host)}") : 71ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Port)}") : 82ReferenceExpression.Create($"sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)}") : 90? ReferenceExpression.Create($"Endpoint=sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;")
Aspire.Hosting.Azure.SignalR (2)
AzureSignalRResource.cs (2)
55ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") : 63ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.Url)};AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGH;Version=1.0;"):
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
98ReferenceExpression.Create($"{InnerResource!.PrimaryEndpoint.Property(EndpointProperty.Host)}") :
Aspire.Hosting.Azure.Storage (6)
AzureStorageEmulatorConnectionString.cs (3)
35builder.Append($"{key}={endpoint.Property(EndpointProperty.Scheme)}://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)}/devstoreaccount1;");
AzureStorageResource.cs (3)
97? ReferenceExpression.Create($"{EmulatorBlobEndpoint.Property(EndpointProperty.Url)}") 117? ReferenceExpression.Create($"{EmulatorQueueEndpoint.Property(EndpointProperty.Url)}") 127? ReferenceExpression.Create($"{EmulatorTableEndpoint.Property(EndpointProperty.Url)}")
Aspire.Hosting.Azure.Tests (37)
AzureAppServiceTests.cs (2)
439.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url)); 1219var expression = env.Resource.GetEndpointPropertyExpression(project.GetEndpoint("http").Property(property));
AzureContainerAppExpressEndpointTests.cs (11)
48context.EnvironmentVariables[property.ToString().ToUpperInvariant()] = endpoint.Property(property); 54context.EnvironmentVariables["SELF_TARGET_PORT"] = web.GetEndpoint("http").Property(EndpointProperty.TargetPort); 115var expression = environment.Resource.GetEndpointPropertyExpression(endpoint.Property(property)); 136var expression = environment.Resource.GetEndpointPropertyExpression(api.GetEndpoint("http").Property(property)); 160environment.Resource.GetEndpointPropertyExpression(api.GetEndpoint("http").Property(property))); 211.WithEnvironment("ORIGIN", api.GetEndpoint("http").Property(property)); 249web.WithEnvironment("HOST", api.GetEndpoint("http").Property(EndpointProperty.Host)); 286.WithEnvironment("API_HOST", endpoint.Property(EndpointProperty.Host)) 287.WithEnvironment("API_AUTHORITY", ReferenceExpression.Create($"api={endpoint.Property(EndpointProperty.HostAndPort)}")); 319.WithEnvironment("API_URL", api.GetEndpoint("http").Property(EndpointProperty.Url)); 345? environment.Resource.GetEndpointPropertyExpression(endpoint.Property(EndpointProperty.Url))
AzureContainerAppsTests.cs (14)
202.WithEnvironment("AGENT_URL", agent.GetEndpoint("http").Property(EndpointProperty.Url)); 423context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 424context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 425context.EnvironmentVariables["HOST"] = httpEp.Property(EndpointProperty.Host); 426context.EnvironmentVariables["HOSTANDPORT"] = httpEp.Property(EndpointProperty.HostAndPort); 427context.EnvironmentVariables["SCHEME"] = httpEp.Property(EndpointProperty.Scheme); 428context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.Property(EndpointProperty.HostAndPort); 529context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 530context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 531context.EnvironmentVariables["HOST"] = httpEp.Property(EndpointProperty.Host); 532context.EnvironmentVariables["HOSTANDPORT"] = httpEp.Property(EndpointProperty.HostAndPort); 533context.EnvironmentVariables["SCHEME"] = httpEp.Property(EndpointProperty.Scheme); 534context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.Property(EndpointProperty.HostAndPort); 2908var expression = env.Resource.GetEndpointPropertyExpression(project.GetEndpoint("http").Property(property));
AzureEnvironmentResourceTests.cs (1)
41environment.GetEndpointPropertyExpression(frontend.GetEndpoint("endpoint").Property(property)));
AzureFrontDoorPrivateLinkTests.cs (1)
149.WithEnvironment("API_HOST", api.GetEndpoint("https").Property(EndpointProperty.Host));
AzureProvisioningResourceExtensionsTests.cs (1)
23var referenceExpression = ReferenceExpression.Create($"prefix:{endpointReference.Property(EndpointProperty.HostAndPort)}");
AzureSandboxesTests.cs (3)
55api.GetEndpoint("http").Property(property), environment.Resource, out var value)); 2265Assert.True(AzureSandboxContainerDeployment.TryResolveEndpointReferenceValue(api.GetEndpoint("http").Property(EndpointProperty.TargetPort), sandboxGroup.Resource, out var targetPortExpression)); 3260$"https://{api.GetEndpoint("http").Property(EndpointProperty.HostAndPort)}/v1"))
FoundryExtensionsTests.cs (1)
898context.EnvironmentVariables["WEATHER_HOST_AND_PORT"] = weatherAgent.GetEndpoint("http").Property(EndpointProperty.HostAndPort);
src\Aspire.Hosting.Azure.Storage\AzureStorageEmulatorConnectionString.cs (3)
35builder.Append($"{key}={endpoint.Property(EndpointProperty.Scheme)}://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)}/devstoreaccount1;");
Aspire.Hosting.Azure.WebPubSub (1)
AzureWebPubSubResource.cs (1)
68IsEmulator ? ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") : ReferenceExpression.Create($"{Endpoint}");
Aspire.Hosting.DevTunnels (1)
DevTunnelResource.cs (1)
124resolvedTargetPort = await TargetEndpoint.Property(property).GetValueAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Docker.Tests (5)
DockerComposePublisherTests.cs (5)
110var consumer = builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("endpoint").Property(property)); 253context.EnvironmentVariables["TP"] = resource.GetEndpoint("http").Property(EndpointProperty.TargetPort); 254context.EnvironmentVariables["TPH2"] = resource.GetEndpoint("h2").Property(EndpointProperty.TargetPort); 1502.WithEnvironment("CACHE_TLS", cache.GetEndpoint("tls").Property(EndpointProperty.TlsEnabled)) 1503.WithEnvironment("CACHE_PLAIN_TLS", cache.GetEndpoint("tcp").Property(EndpointProperty.TlsEnabled));
Aspire.Hosting.Foundry (2)
HostedAgent\AzureHostedAgentResource.cs (1)
424return await ResolvePublishedEndpointAsync(endpointReference.Property(EndpointProperty.Url), context, hostedAgent, resource, environmentVariableName, cancellationToken).ConfigureAwait(false);
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Foundry.Tests (1)
ProjectResourceTests.cs (1)
25var value = ((IComputeEnvironmentResource)project.Resource).GetEndpointPropertyExpression(agent.GetEndpoint("http").Property(property));
Aspire.Hosting.Garnet (3)
GarnetResource.cs (3)
38public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 43public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 69builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.JavaScript (4)
DenoHostingExtensions.cs (2)
440context.EnvironmentVariables["PORT"] = endpointReference.Property(EndpointProperty.TargetPort); 1424: endpoint.Property(EndpointProperty.TargetPort);
JavaScriptHostingExtensions.cs (2)
2031c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort)); 2232c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Kafka (10)
KafkaBuilderExtensions.cs (7)
164? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.Property(EndpointProperty.TargetPort)}") 165: ReferenceExpression.Create($"{endpoint.Property(EndpointProperty.HostAndPort)}"); 247? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Property(EndpointProperty.Port)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.Property(EndpointProperty.TargetPort)}") 248: ReferenceExpression.Create($"PLAINTEXT://{primaryEndpoint.Property(EndpointProperty.Host)}:29092,PLAINTEXT_HOST://{primaryEndpoint.Property(EndpointProperty.HostAndPort)},PLAINTEXT_INTERNAL://{internalEndpoint.Property(EndpointProperty.HostAndPort)}");
KafkaServerResource.cs (3)
35public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 40public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 52ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Keycloak (1)
KeycloakResourceBuilderExtensions.cs (1)
120context.EnvironmentVariables["KC_HTTPS_PORT"] = keycloak.GetEndpoint(KeycloakResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort);
Aspire.Hosting.Kubernetes (1)
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
Aspire.Hosting.Kubernetes.Tests (4)
KubernetesPublisherTests.cs (4)
37builder.AddContainer("consumer", "image").WithEnvironment("ORIGINS", web.GetEndpoint("endpoint").Property(property)); 71.WithEnvironment("PORT", web.GetEndpoint("HTTP").Property(EndpointProperty.Port)); 2109.WithEnvironment("CACHE_TLS", cache.GetEndpoint("tls").Property(EndpointProperty.TlsEnabled)) 2110.WithEnvironment("CACHE_PLAIN_TLS", cache.GetEndpoint("tcp").Property(EndpointProperty.TlsEnabled));
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
377portValue = await endpointReference.Property(property).GetValueAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Milvus (3)
MilvusServerResource.cs (3)
45public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 50public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 73public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.MongoDB (5)
MongoDBServerResource.cs (3)
47public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 52public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 147builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (1)
162.Property(EndpointProperty.HostAndPort)
ReplicaSet\MongoDBReplicaSetResource.cs (1)
107builder.Append($"{member.PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.MySql (4)
MySqlServerResource.cs (4)
42public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 47public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 59$"Server={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter}");
Aspire.Hosting.Nats (3)
NatsServerResource.cs (3)
42public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 47public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 100builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Oracle (3)
OracleDatabaseServerResource.cs (3)
39public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 44public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 56$"user id={DefaultUserName};password={PasswordParameter};data source={PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.PostgreSQL (4)
PostgresServerResource.cs (4)
61$"Host={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};Username={UserNameReference};Password={PasswordParameter}"); 112public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 117public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
299c.Args.Add(endpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Qdrant (8)
QdrantServerResource.cs (8)
45public EndpointReferenceExpression GrpcHost => PrimaryEndpoint.Property(EndpointProperty.Host); 50public EndpointReferenceExpression GrpcPort => PrimaryEndpoint.Property(EndpointProperty.Port); 60public EndpointReferenceExpression HttpHost => HttpEndpoint.Property(EndpointProperty.Host); 65public EndpointReferenceExpression HttpPort => HttpEndpoint.Property(EndpointProperty.Port); 72$"Endpoint={PrimaryEndpoint.Property(EndpointProperty.Url)};Key={ApiKeyParameter}"); 80public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}"); 87$"Endpoint={HttpEndpoint.Property(EndpointProperty.Url)};Key={ApiKeyParameter}"); 95public ReferenceExpression HttpUriExpression => ReferenceExpression.Create($"{HttpEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.RabbitMQ (3)
RabbitMQServerResource.cs (3)
48public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 53public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 104builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Radius (1)
Publishing\RadiusInfrastructureBuilder.cs (1)
4890ResolveHostExpression(((IComputeEnvironmentResource)_environment).GetEndpointPropertyExpression(endpointReference.Property(EndpointProperty.Url)));
Aspire.Hosting.Radius.Tests (23)
Publishing\BackingResourceContractTests.cs (3)
137() => ((IComputeEnvironmentResource)environment).GetEndpointPropertyExpression(endpoint.Property(property))); 158.GetEndpointPropertyExpression(cache.GetEndpoint("tcp").Property(EndpointProperty.Host))); 217.GetEndpointPropertyExpression(endpoint.Property(property));
Publishing\BackingResourceProjectionTests.cs (4)
90.WithEnvironment("CUSTOM_HOST", cache.GetEndpoint("tcp").Property(EndpointProperty.Host)) 91.WithEnvironment("CUSTOM_PORT", cache.GetEndpoint("tcp").Property(EndpointProperty.Port)) 92.WithEnvironment("CUSTOM_URL", cache.GetEndpoint("tcp").Property(EndpointProperty.Url)); 112.WithEnvironment("BACKEND_HOST", backend.GetEndpoint("http").Property(EndpointProperty.Host));
Publishing\BackingResourceValueResolutionTests.cs (10)
125.WithEnvironment("MISSING", backend.GetEndpoint("does-not-exist").Property(EndpointProperty.Host)) 126.WithEnvironment("PRESENT", backend.GetEndpoint("http").Property(EndpointProperty.Host)); 415.WithEnvironment("MGMT_URL", rabbit.GetEndpoint("management").Property(EndpointProperty.Url)); 434.WithEnvironment("AMQP_HOST", rabbit.GetEndpoint("tcp").Property(EndpointProperty.Host)); 967.WithEnvironment("CACHE_URL", cache.GetEndpoint("tcp").Property(EndpointProperty.Url)); 986.WithEnvironment("CACHE_HOST", cache.GetEndpoint("tcp").Property(EndpointProperty.Host)) 987.WithEnvironment("CACHE_PORT", cache.GetEndpoint("tcp").Property(EndpointProperty.Port)); 1190var port = cache.GetEndpoint("tcp").Property(EndpointProperty.Port); 1217ReferenceExpression.Create($"primary-{cache.GetEndpoint("tcp").Property(EndpointProperty.Host)}"), 1476.WithEnvironment("STORE_HOST", store.GetEndpoint("tcp").Property(EndpointProperty.Host));
Publishing\RadiusDeployParametersTests.cs (1)
45.WithEnvironment("ORIGINS", producer.GetEndpoint("endpoint").Property(property));
RadiusEnvironmentResourceTests.cs (5)
24((IComputeEnvironmentResource)environment.Resource).GetEndpointPropertyExpression(web.GetEndpoint("http").Property(property))); 111.GetEndpointPropertyExpression(endpoint.Property(property)); 141.GetEndpointPropertyExpression(endpoint.Property(property))); 166.GetEndpointPropertyExpression(endpoint.Property(EndpointProperty.Scheme)); 188.GetEndpointPropertyExpression(endpoint.Property(EndpointProperty.Scheme));
Aspire.Hosting.Redis (7)
RedisBuilderExtensions.cs (3)
209argsCtx.Args.Add(redis.GetEndpoint(RedisResource.PrimaryEndpointName).Property(EndpointProperty.TargetPort)); 211argsCtx.Args.Add(redis.GetEndpoint(RedisResource.SecondaryEndpointName).Property(EndpointProperty.TargetPort)); 399context.EnvironmentVariables[$"RI_REDIS_HOST{counter}"] = redisInstance.PrimaryEndpoint.Property(EndpointProperty.Host);
RedisResource.cs (4)
57public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 62public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 90builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}"); 151builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.Scheme)}");
Aspire.Hosting.Seq (4)
SeqResource.cs (4)
28public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 33public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 39ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}"); 47public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.SqlServer (4)
SqlServerServerResource.cs (4)
39public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 44public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 53$"Server={PrimaryEndpoint.Property(EndpointProperty.IPV4Host)},{PrimaryEndpoint.Property(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter};TrustServerCertificate=true");
Aspire.Hosting.Tests (101)
ComputeEnvironmentEndpointResolverTests.cs (6)
24endpoint.Property(EndpointProperty.Url), [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); 146endpoint.Property(EndpointProperty.Url), [currentEnv.Resource], out _));
ComputeEnvironmentValidationTests.cs (3)
25environment.GetEndpointPropertyExpression(endpoint.Property(property))); 99var expression = environment.GetEndpointPropertyExpression(endpointReference.Property(property)); 112var ex = Assert.Throws<InvalidOperationException>(() => environment.GetEndpointPropertyExpression(endpointReference.Property(EndpointProperty.Url)));
ConditionalReferenceExpressionTests.cs (5)
86var condition = endpointRef.Property(EndpointProperty.TlsEnabled); 250var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled); 267var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled); 281var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled); 294var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled);
Dcp\DcpExecutorTests.cs (33)
771.WithArgs(c => c.Args.Add(endpoint.Property(EndpointProperty.Port))); 811c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 5016Assert.Equal(allocatedPort.ToString(CultureInfo.InvariantCulture), await database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port).GetValueAsync()); 5032database.WithEnvironment("PUBLIC_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 5033database.WithEnvironment("PUBLIC_PORT_AGAIN", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.Port)); 5080database.WithEnvironment("PUBLIC_HOST_AND_PORT", database.GetEndpoint("NoPortTargetPortSet").Property(EndpointProperty.HostAndPort)); 10293.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 10294.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 10300.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 10301.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 10484c.EnvironmentVariables["EXEC_PORT"] = executable.GetEndpoint("http").Property(EndpointProperty.Port); 10519c.EnvironmentVariables["EXEC_PORT"] = executable.GetEndpoint("http").Property(EndpointProperty.Port); 10560c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10796c.Args.Add(executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10833.WithEnvironment("EXEC_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10864.WithEnvironment("EXECUTABLE_PORT", executable.GetEndpoint("http").Property(EndpointProperty.Port)); 10897$"{containerEndpoint.Property(EndpointProperty.Scheme)}://{containerEndpoint.Property(EndpointProperty.Host)}:{containerEndpoint.Property(EndpointProperty.Port)}")) 10898.WithEnvironment("HOST_PORT", executable.GetEndpoint("unused").Property(EndpointProperty.Port)); 10942.WithEnvironment("TARGET_PORT", targetEndpoint.Property(EndpointProperty.Port)); 10986project.GetEndpoint("http", KnownNetworkIdentifiers.DefaultAspireContainerNetwork).Property(EndpointProperty.Port)); 11025target.GetEndpoint("http", KnownNetworkIdentifiers.DefaultAspireContainerNetwork).Property(EndpointProperty.Port)); 11062executable.GetEndpoint("http", KnownNetworkIdentifiers.DefaultAspireContainerNetwork).Property(EndpointProperty.Port)); 11131executable.GetEndpoint("udp", KnownNetworkIdentifiers.DefaultAspireContainerNetwork).Property(EndpointProperty.Port)); 11186target.GetEndpoint("http", KnownNetworkIdentifiers.DefaultAspireContainerNetwork).Property(EndpointProperty.Port)); 11227context.EnvironmentVariables["CONTAINER_PORT"] = containerEndpoint.Property(EndpointProperty.Port); 11276executable.GetEndpoint("http", KnownNetworkIdentifiers.DefaultAspireContainerNetwork).Property(EndpointProperty.Port)); 11316.WithEnvironment("TARGET_PORT", containerEndpoint.Property(EndpointProperty.Port)); 11318.WithEnvironment("TARGET_PORT", target.GetEndpoint("http").Property(EndpointProperty.Port)); 11374.WithEnvironment("EXEC_A_PORT", executableA.GetEndpoint("http").Property(EndpointProperty.Port)); 11380.WithEnvironment("EXEC_B_PORT", executableB.GetEndpoint("http").Property(EndpointProperty.Port)) 11437.WithEnvironment("UPSTREAM_PORT", upstreamExecutable.GetEndpoint("http").Property(EndpointProperty.Port))
EndpointReferenceTests.cs (16)
74var endpointExpr = endpointRef.Property(EndpointProperty.Url); 94var endpointExpr = endpointRef.Property(EndpointProperty.Url); 108var hostExpr = endpointRef.Property(EndpointProperty.Host); 127var portExpr = endpointRef.Property(EndpointProperty.Port); 146var schemeExpr = endpointRef.Property(EndpointProperty.Scheme); 160var ipv4Expr = endpointRef.Property(EndpointProperty.IPV4Host); 174var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 188var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 207var endpointExpr = endpointRef.Property(EndpointProperty.Url); 225var expr1 = endpointRef.Property(EndpointProperty.Url); 226var expr2 = endpointRef.Property(EndpointProperty.Host); 227var expr3 = endpointRef.Property(EndpointProperty.Port); 388var expression = destination.GetEndpoint(annotation.Name).Property(property); 615Assert.Equal(expected, await endpoint.Property(property).GetValueAsync()); 642var value = resource.GetEndpoint("http").Property(property).GetValueAsync(cts.Token); 657var expression = endpoint.Property(property);
ExpressionResolverTests.cs (19)
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)};") }, 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)}/;") }, 392{ "UrlEncodedHost", ReferenceExpression.Create($"Host={Endpoint3.Property(EndpointProperty.Host):uri};") },
ManifestExpressionTests.cs (10)
166var tls = endpoint.Property(EndpointProperty.TlsEnabled); 306backend.WithEnvironment("TLS", backend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled)); 406var origin = endpoint.Property(property); 409var selected = ReferenceExpression.CreateConditional(endpoint.Property(EndpointProperty.TlsEnabled), bool.FalseString, 410ReferenceExpression.Create($"{frontend.GetEndpoint("HTTP").Property(property)}"), 419.WithEnvironment("HOST", endpoint.Property(EndpointProperty.Host)); 472var origin = ReferenceExpression.Create($"{frontend.GetEndpoint("http").Property(EndpointProperty.BrowserOrigins)}"); 475frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled), 500frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled), bool.TrueString, 545var conditional = ReferenceExpression.CreateConditional(frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled),
ResourceDependencyTests.cs (1)
55.WithEnvironment("API_PORT", api.GetEndpoint("http").Property(EndpointProperty.Port));
Schema\SchemaTests.cs (1)
55var tls = frontend.GetEndpoint("http").Property(EndpointProperty.TlsEnabled);
src\Shared\ComputeEnvironmentEndpointResolver.cs (1)
51endpointReference.Property(EndpointProperty.Url),
WithEnvironmentTests.cs (6)
68.WithEnvironment("PORT", $"{endpoint.Property(EndpointProperty.Port)}") 69.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}") 116.WithEnvironment("URL", $"{endpoint.Property(EndpointProperty.Host)}:{endpoint.Property(EndpointProperty.Port)}"); 149.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}"); 468var portProperty = endpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Valkey (3)
ValkeyResource.cs (3)
43public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 48public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 69builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Yarp (5)
YarpResourceExtensions.cs (5)
72.WithEnvironment("ASPNETCORE_HTTPS_PORT", resource.GetEndpoint("https").Property(EndpointProperty.Port)) 73.WithEnvironment("ASPNETCORE_URLS", $"{resource.GetEndpoint("https").Property(EndpointProperty.Scheme)}://*:{resource.GetEndpoint("https").Property(EndpointProperty.TargetPort)};{resource.GetEndpoint("http").Property(EndpointProperty.Scheme)}://*:{resource.GetEndpoint("http").Property(EndpointProperty.TargetPort)}");
AspireWithNode.AppHost (1)
AppHost.cs (1)
44ctx.EnvironmentVariables["HTTPS_REDIRECT_PORT"] = httpsEndpoint.Property(EndpointProperty.Port);
Stress.AppHost (7)
AppHost.cs (7)
25.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))); 29.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))); 34.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))); 38.WithArgs(c => c.Args.Add(manualArgEndpoint.Property(EndpointProperty.Port))) 75.WithEnvironment("HOST", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Host)}") 76.WithEnvironment("PORT", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Port)}") 77.WithEnvironment("URL", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Url)}");