182 references to Property
Aspire.Hosting (13)
ApplicationModel\EndpointReference.cs (3)
80public ValueTask<string?> GetValueAsync(CancellationToken cancellationToken = default) => Property(EndpointProperty.Url).GetValueAsync(cancellationToken); 88public ValueTask<string?> GetValueAsync(ValueProviderContext context, CancellationToken cancellationToken = default) => Property(EndpointProperty.Url).GetValueAsync(context, cancellationToken); 145Property(EndpointProperty.TlsEnabled),
Dashboard\DashboardEventHandlers.cs (4)
684ReferenceExpression.Create($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 730aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (5)
967context.EnvironmentVariables["ASPNETCORE_HTTPS_PORT"] = e.Property(EndpointProperty.Port); 972aspnetCoreUrls.Append($"{e.Property(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.Property(EndpointProperty.TargetPort)}"); 1017ports.Append($"{e.Property(EndpointProperty.TargetPort)}"); 1049var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
1122context.EnvironmentVariables[env] = endpointReference.Property(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
48? ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.Url)};Id=anonymous;Secret=abcdefghijklmnopqrstuvwxyz1234567890;Anonymous=True")
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)
106ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") :
Aspire.Hosting.Azure.EventHubs (5)
AzureEventHubsResource.cs (5)
65ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Host)}") : 77ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Port)}") : 88ReferenceExpression.Create($"sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)}") : 102builder.Append($"Endpoint=sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true"); 212yield return new("ConnectionString", ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true"));
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
222context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.Property(EndpointProperty.TargetPort)}"); 309context.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
56ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") : 72ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") :
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerResource.cs (1)
90ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}") :
Aspire.Hosting.Azure.Redis (2)
AzureManagedRedisResource.cs (1)
102ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.Property(EndpointProperty.Host)}") :
AzureRedisCacheResource.cs (1)
79ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}") :
Aspire.Hosting.Azure.ServiceBus (4)
AzureServiceBusResource.cs (4)
55ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Host)}") : 67ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Port)}") : 78ReferenceExpression.Create($"sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)}") : 86? ReferenceExpression.Create($"Endpoint=sb://{EmulatorEndpoint.Property(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;")
Aspire.Hosting.Azure.SignalR (2)
AzureSignalRResource.cs (2)
52ReferenceExpression.Create($"{EmulatorEndpoint.Property(EndpointProperty.Url)}") : 60ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.Property(EndpointProperty.Url)};AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGH;Version=1.0;"):
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
104ReferenceExpression.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)
82? ReferenceExpression.Create($"{EmulatorBlobEndpoint.Property(EndpointProperty.Url)}") 102? ReferenceExpression.Create($"{EmulatorQueueEndpoint.Property(EndpointProperty.Url)}") 112? ReferenceExpression.Create($"{EmulatorTableEndpoint.Property(EndpointProperty.Url)}")
Aspire.Hosting.Azure.Tests (16)
AzureContainerAppsTests.cs (12)
315context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 316context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 317context.EnvironmentVariables["HOST"] = httpEp.Property(EndpointProperty.Host); 318context.EnvironmentVariables["HOSTANDPORT"] = httpEp.Property(EndpointProperty.HostAndPort); 319context.EnvironmentVariables["SCHEME"] = httpEp.Property(EndpointProperty.Scheme); 320context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.Property(EndpointProperty.HostAndPort); 392context.EnvironmentVariables["TARGET_PORT"] = httpEp.Property(EndpointProperty.TargetPort); 393context.EnvironmentVariables["PORT"] = httpEp.Property(EndpointProperty.Port); 394context.EnvironmentVariables["HOST"] = httpEp.Property(EndpointProperty.Host); 395context.EnvironmentVariables["HOSTANDPORT"] = httpEp.Property(EndpointProperty.HostAndPort); 396context.EnvironmentVariables["SCHEME"] = httpEp.Property(EndpointProperty.Scheme); 397context.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 (3)
GarnetResource.cs (3)
35public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 40public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 66builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
540c.Args.Add(targetEndpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Kafka (10)
KafkaBuilderExtensions.cs (7)
141? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.Property(EndpointProperty.TargetPort)}") 142: ReferenceExpression.Create($"{endpoint.Property(EndpointProperty.HostAndPort)}"); 222? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Property(EndpointProperty.Port)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.Property(EndpointProperty.TargetPort)}") 223: ReferenceExpression.Create($"PLAINTEXT://{primaryEndpoint.Property(EndpointProperty.Host)}:29092,PLAINTEXT_HOST://{primaryEndpoint.Property(EndpointProperty.HostAndPort)},PLAINTEXT_INTERNAL://{internalEndpoint.Property(EndpointProperty.HostAndPort)}");
KafkaServerResource.cs (3)
32public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 37public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 49ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Milvus (3)
MilvusServerResource.cs (3)
42public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 47public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 70public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.MongoDB (3)
MongoDBServerResource.cs (3)
40public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 45public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 102builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.MySql (4)
MySqlServerResource.cs (4)
39public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 44public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 56$"Server={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter}");
Aspire.Hosting.Nats (3)
NatsServerResource.cs (3)
39public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 44public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 97builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Oracle (3)
OracleDatabaseServerResource.cs (3)
36public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 41public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 53$"user id={DefaultUserName};password={PasswordParameter};data source={PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.PostgreSQL (4)
PostgresServerResource.cs (4)
58$"Host={PrimaryEndpoint.Property(EndpointProperty.Host)};Port={PrimaryEndpoint.Property(EndpointProperty.Port)};Username={UserNameReference};Password={PasswordParameter}"); 109public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 114public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
294c.Args.Add(endpoint.Property(EndpointProperty.TargetPort));
Aspire.Hosting.Qdrant (8)
QdrantServerResource.cs (8)
42public EndpointReferenceExpression GrpcHost => PrimaryEndpoint.Property(EndpointProperty.Host); 47public EndpointReferenceExpression GrpcPort => PrimaryEndpoint.Property(EndpointProperty.Port); 57public EndpointReferenceExpression HttpHost => HttpEndpoint.Property(EndpointProperty.Host); 62public EndpointReferenceExpression HttpPort => HttpEndpoint.Property(EndpointProperty.Port); 69$"Endpoint={PrimaryEndpoint.Property(EndpointProperty.Url)};Key={ApiKeyParameter}"); 77public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}"); 84$"Endpoint={HttpEndpoint.Property(EndpointProperty.Url)};Key={ApiKeyParameter}"); 92public ReferenceExpression HttpUriExpression => ReferenceExpression.Create($"{HttpEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.RabbitMQ (3)
RabbitMQServerResource.cs (3)
45public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 50public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 101builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Redis (7)
RedisBuilderExtensions.cs (3)
192argsCtx.Args.Add(redis.GetEndpoint(RedisResource.PrimaryEndpointName).Property(EndpointProperty.Port)); 194argsCtx.Args.Add(redis.GetEndpoint(RedisResource.SecondaryEndpointName).Property(EndpointProperty.Port)); 325context.EnvironmentVariables[$"RI_REDIS_HOST{counter}"] = redisInstance.PrimaryEndpoint.Property(EndpointProperty.Host);
RedisResource.cs (4)
54public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 59public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 87builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}"); 148builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.Scheme)}");
Aspire.Hosting.Seq (4)
SeqResource.cs (4)
25public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 30public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 36ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}"); 44public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}");
Aspire.Hosting.SqlServer (4)
SqlServerServerResource.cs (4)
36public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 41public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 50$"Server={PrimaryEndpoint.Property(EndpointProperty.IPV4Host)},{PrimaryEndpoint.Property(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter};TrustServerCertificate=true");
Aspire.Hosting.Tests (48)
ConditionalReferenceExpressionTests.cs (5)
81var condition = endpointRef.Property(EndpointProperty.TlsEnabled); 130var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled); 147var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled); 161var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled); 174var tlsExpr = endpointRef.Property(EndpointProperty.TlsEnabled);
Dcp\DcpExecutorTests.cs (4)
2227.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 2228.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port)); 2234.WithEnvironment("EXE_PROXIED_PORT", executable.GetEndpoint("proxied").Property(EndpointProperty.Port)) 2235.WithEnvironment("EXE_NOTPROXIED_PORT", executable.GetEndpoint("notProxied").Property(EndpointProperty.Port));
EndpointReferenceTests.cs (13)
38var endpointExpr = endpointRef.Property(EndpointProperty.Url); 58var endpointExpr = endpointRef.Property(EndpointProperty.Url); 72var hostExpr = endpointRef.Property(EndpointProperty.Host); 91var portExpr = endpointRef.Property(EndpointProperty.Port); 110var schemeExpr = endpointRef.Property(EndpointProperty.Scheme); 124var ipv4Expr = endpointRef.Property(EndpointProperty.IPV4Host); 138var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 152var targetPortExpr = endpointRef.Property(EndpointProperty.TargetPort); 171var endpointExpr = endpointRef.Property(EndpointProperty.Url); 189var expr1 = endpointRef.Property(EndpointProperty.Url); 190var expr2 = endpointRef.Property(EndpointProperty.Host); 191var expr3 = endpointRef.Property(EndpointProperty.Port); 352var expression = destination.GetEndpoint(annotation.Name).Property(property);
ExpressionResolverTests.cs (19)
290ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Url)}"); 314{ "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)}/;") }, 315{ "Url", ReferenceExpression.Create($"Url={Endpoint1.Property(EndpointProperty.Url)};") }, 317{ "OnlyHost", ReferenceExpression.Create($"Host={Endpoint1.Property(EndpointProperty.Host)};") }, 318{ "OnlyPort", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};") }, 319{ "HostAndPort", ReferenceExpression.Create($"HostPort={Endpoint1.Property(EndpointProperty.HostAndPort)}") }, 320{ "PortBeforeHost", ReferenceExpression.Create($"Port={Endpoint1.Property(EndpointProperty.Port)};Host={Endpoint1.Property(EndpointProperty.Host)};") }, 321{ "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)}/;") }, 326{ "UrlEncodedHost", ReferenceExpression.Create($"Host={Endpoint3.Property(EndpointProperty.Host):uri};") },
ResourceDependencyTests.cs (1)
52.WithEnvironment("API_PORT", api.GetEndpoint("http").Property(EndpointProperty.Port));
WithEnvironmentTests.cs (6)
240.WithEnvironment("PORT", $"{endpoint.Property(EndpointProperty.Port)}") 241.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}") 288.WithEnvironment("URL", $"{endpoint.Property(EndpointProperty.Host)}:{endpoint.Property(EndpointProperty.Port)}"); 321.WithEnvironment("TARGET_PORT", $"{endpoint.Property(EndpointProperty.TargetPort)}"); 452var portProperty = endpoint.Property(EndpointProperty.Port);
Aspire.Hosting.Valkey (3)
ValkeyResource.cs (3)
40public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); 45public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); 66builder.Append($"{PrimaryEndpoint.Property(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Yarp (5)
YarpResourceExtensions.cs (5)
71.WithEnvironment("ASPNETCORE_HTTPS_PORT", resource.GetEndpoint("https").Property(EndpointProperty.Port)) 72.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)
40ctx.EnvironmentVariables["HTTPS_REDIRECT_PORT"] = httpsEndpoint.Property(EndpointProperty.Port);
Stress.AppHost (3)
Program.cs (3)
44.WithEnvironment("HOST", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Host)}") 45.WithEnvironment("PORT", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Port)}") 46.WithEnvironment("URL", $"{serviceBuilder.GetEndpoint("http").Property(EndpointProperty.Url)}");