88 references to Property
Aspire.Hosting (8)
ApplicationModel\ExpressionResolver.cs (2)
67(EndpointProperty.Port, true, true) => await endpointReference.Property(EndpointProperty.TargetPort).GetValueAsync(cancellationToken).ConfigureAwait(false), 77_ => await endpointReference.Property(property).GetValueAsync(cancellationToken).ConfigureAwait(false)
ProjectResourceBuilderExtensions.cs (5)
757context.EnvironmentVariables["ASPNETCORE_HTTPS_PORT"] = e.Property(EndpointProperty.Port); 765aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{targetHost}:{e.Property(EndpointProperty.TargetPort)}"); 810ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 842var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
599context.EnvironmentVariables[env] = endpointReference.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.CosmosDB (3)
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;");
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsResource.cs (1)
59builder.Append($"Endpoint=sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true");
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
109context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.Property(EndpointProperty.TargetPort)}"); 196context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusResource.cs (1)
43? ReferenceExpression.Create($"Endpoint=sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;")
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRResource.cs (1)
40? ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.Url)};AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGH;Version=1.0;")
Aspire.Hosting.Azure.Storage (3)
AzureStorageEmulatorConnectionString.cs (3)
35builder.Append($"{key}={endpoint.Property(EndpointProperty.Scheme)}://{endpoint.Property(EndpointProperty.IPV4Host)}:{endpoint.Property(EndpointProperty.Port)}/devstoreaccount1;");
Aspire.Hosting.Azure.Tests (16)
AzureContainerAppsTests.cs (12)
307context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 308context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 309context.EnvironmentVariables["HOST"] = httpEp.Property(EndpointProperty.Host); 310context.EnvironmentVariables["HOSTANDPORT"] = httpEp.Property(EndpointProperty.HostAndPort); 311context.EnvironmentVariables["SCHEME"] = httpEp.Property(EndpointProperty.Scheme); 312context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.Property(EndpointProperty.HostAndPort); 384context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 385context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 386context.EnvironmentVariables["HOST"] = httpEp.Property(EndpointProperty.Host); 387context.EnvironmentVariables["HOSTANDPORT"] = httpEp.Property(EndpointProperty.HostAndPort); 388context.EnvironmentVariables["SCHEME"] = httpEp.Property(EndpointProperty.Scheme); 389context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.Property(EndpointProperty.HostAndPort);
AzureProvisioningResourceExtensionsTests.cs (1)
21var referenceExpression = ReferenceExpression.Create($"prefix:{endpointReference.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.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
65context.EnvironmentVariables["TP"] = resource.GetEndpoint("http").Property(EndpointProperty.TargetPort); 66context.EnvironmentVariables["TPH2"] = resource.GetEndpoint("h2").Property(EndpointProperty.TargetPort);
Aspire.Hosting.Garnet (1)
GarnetResource.cs (1)
55builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Kafka (8)
KafkaBuilderExtensions.cs (7)
142? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.Property(EndpointProperty.TargetPort)}") 143: ReferenceExpression.Create($"{endpoint.Property(EndpointProperty.HostAndPort)}"); 220? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Property(EndpointProperty.Port)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.Property(EndpointProperty.TargetPort)}") 221: ReferenceExpression.Create($"PLAINTEXT://{primaryEndpoint.Property(EndpointProperty.Host)}:29092,PLAINTEXT_HOST://{primaryEndpoint.Property(EndpointProperty.HostAndPort)},PLAINTEXT_INTERNAL://{internalEndpoint.Property(EndpointProperty.HostAndPort)}");
KafkaServerResource.cs (1)
38ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Milvus (1)
MilvusServerResource.cs (1)
43$"Endpoint={PrimaryEndpoint.Property(EndpointProperty.Url)};Key=root:{ApiKeyParameter}");
Aspire.Hosting.MongoDB (1)
MongoDBServerResource.cs (1)
66builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.MySql (2)
MySqlServerResource.cs (2)
44$"Server={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};User ID=root;Password={PasswordParameter}");
Aspire.Hosting.Nats (1)
NatsServerResource.cs (1)
65builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Oracle (1)
OracleDatabaseServerResource.cs (1)
41$"user id=system;password={PasswordParameter};data source={PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.PostgreSQL (2)
PostgresServerResource.cs (2)
51$"Host={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};Username={UserNameReference};Password={PasswordParameter}");
Aspire.Hosting.Qdrant (2)
QdrantServerResource.cs (2)
48$"Endpoint={PrimaryEndpoint.Property(EndpointProperty.Url)};Key={ApiKeyParameter}"); 55$"Endpoint={HttpEndpoint.Property(EndpointProperty.Url)};Key={ApiKeyParameter}");
Aspire.Hosting.RabbitMQ (1)
RabbitMQServerResource.cs (1)
55$"amqp://{UserNameReference}:{PasswordParameter}@{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Redis (1)
RedisResource.cs (1)
42builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Seq (1)
SeqResource.cs (1)
25ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.SqlServer (2)
SqlServerServerResource.cs (2)
38$"Server={PrimaryEndpoint.Property(EndpointProperty.IPV4Host)},{PrimaryEndpoint.Property(EndpointProperty.Port)};User ID=sa;Password={PasswordParameter};TrustServerCertificate=true");
Aspire.Hosting.Tests (23)
ExpressionResolverTests.cs (18)
200ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}"); 223{ "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)}/;") }, 224{ "Url", ReferenceExpression.Create($"Url={Endpoint1.Property(EndpointProperty.Url)};") }, 226{ "OnlyHost", ReferenceExpression.Create($"Host={Endpoint1.Property(EndpointProperty.Host)};") }, 227{ "OnlyPort", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};") }, 228{ "HostAndPort", ReferenceExpression.Create($"HostPort={Endpoint1.Property(EndpointProperty.HostAndPort)}") }, 229{ "PortBeforeHost", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};Host={Endpoint1.Property(EndpointProperty.Host)};") }, 230{ "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)}/;") },
WithEnvironmentTests.cs (5)
237.WithEnvironment("PORT", $"{endpoint.Property(EndpointProperty.Port)}") 238.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}") 285.WithEnvironment("URL", $"{endpoint.Property(EndpointProperty.Host)}:{endpoint.Property(EndpointProperty.Port)}"); 311.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}");
Aspire.Hosting.Valkey (1)
ValkeyResource.cs (1)
55builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Stress.AppHost (3)
Program.cs (3)
36.WithEnvironment("HOST", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Host)}") 37.WithEnvironment("PORT", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Port)}") 38.WithEnvironment("URL", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Url)}");