146 references to Property
Aspire.Hosting (13)
ApplicationModel\EndpointReference.cs (1)
58
public ValueTask<string?> GetValueAsync(CancellationToken cancellationToken = default) =>
Property
(EndpointProperty.Url).GetValueAsync(cancellationToken);
ApplicationModel\ExpressionResolver.cs (2)
22
(EndpointProperty.Port, true) => await endpointReference.
Property
(EndpointProperty.TargetPort).GetValueAsync(cancellationToken).ConfigureAwait(false),
32
_ => await endpointReference.
Property
(property).GetValueAsync(cancellationToken).ConfigureAwait(false)
Dashboard\DashboardEventHandlers.cs (4)
613
ReferenceExpression.Create($"{e.
Property
(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.
Property
(EndpointProperty.TargetPort)}");
658
aspnetCoreUrls.Append($"{e.
Property
(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.
Property
(EndpointProperty.TargetPort)}");
ProjectResourceBuilderExtensions.cs (5)
915
context.EnvironmentVariables["ASPNETCORE_HTTPS_PORT"] = e.
Property
(EndpointProperty.Port);
920
aspnetCoreUrls.Append($"{e.
Property
(EndpointProperty.Scheme)}://{e.EndpointAnnotation.TargetHost}:{e.
Property
(EndpointProperty.TargetPort)}");
965
ports.Append($"{e.
Property
(EndpointProperty.TargetPort)}");
997
var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.
Property
(EndpointProperty.TargetPort)}");
ResourceBuilderExtensions.cs (1)
846
context.EnvironmentVariables[env] = endpointReference.
Property
(EndpointProperty.TargetPort);
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationResource.cs (1)
41
? ReferenceExpression.Create($"Endpoint={EmulatorEndpoint.
Property
(EndpointProperty.Url)};Id=anonymous;Secret=abcdefghijklmnopqrstuvwxyz1234567890;Anonymous=True")
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)
59
builder.Append($"Endpoint=sb://{EmulatorEndpoint.
Property
(EndpointProperty.HostAndPort)};SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true");
Aspire.Hosting.Azure.Functions (2)
AzureFunctionsProjectResourceExtensions.cs (2)
122
context.EnvironmentVariables["ASPNETCORE_URLS"] = ReferenceExpression.Create($"http://+:{endpoint.
Property
(EndpointProperty.TargetPort)}");
209
context.Args.Add(targetEndpoint.
Property
(EndpointProperty.TargetPort));
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerResource.cs (1)
83
ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}") :
Aspire.Hosting.Azure.Redis (2)
AzureRedisCacheResource.cs (1)
78
ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}") :
AzureRedisEnterpriseResource.cs (1)
83
ReferenceExpression.Create($"{InnerResource.PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}") :
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)
35
builder.Append($"{key}={endpoint.
Property
(EndpointProperty.Scheme)}://{endpoint.
Property
(EndpointProperty.IPV4Host)}:{endpoint.
Property
(EndpointProperty.Port)}/devstoreaccount1;");
Aspire.Hosting.Azure.Tests (16)
AzureContainerAppsTests.cs (12)
312
context.EnvironmentVariables["TARGET_PORT"] = httpEp.
Property
(EndpointProperty.TargetPort);
313
context.EnvironmentVariables["PORT"] = httpEp.
Property
(EndpointProperty.Port);
314
context.EnvironmentVariables["HOST"] = httpEp.
Property
(EndpointProperty.Host);
315
context.EnvironmentVariables["HOSTANDPORT"] = httpEp.
Property
(EndpointProperty.HostAndPort);
316
context.EnvironmentVariables["SCHEME"] = httpEp.
Property
(EndpointProperty.Scheme);
317
context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.
Property
(EndpointProperty.HostAndPort);
389
context.EnvironmentVariables["TARGET_PORT"] = httpEp.
Property
(EndpointProperty.TargetPort);
390
context.EnvironmentVariables["PORT"] = httpEp.
Property
(EndpointProperty.Port);
391
context.EnvironmentVariables["HOST"] = httpEp.
Property
(EndpointProperty.Host);
392
context.EnvironmentVariables["HOSTANDPORT"] = httpEp.
Property
(EndpointProperty.HostAndPort);
393
context.EnvironmentVariables["SCHEME"] = httpEp.
Property
(EndpointProperty.Scheme);
394
context.EnvironmentVariables["INTERNAL_HOSTANDPORT"] = internalEp.
Property
(EndpointProperty.HostAndPort);
AzureProvisioningResourceExtensionsTests.cs (1)
21
var referenceExpression = ReferenceExpression.Create($"prefix:{endpointReference.
Property
(EndpointProperty.HostAndPort)}");
src\Aspire.Hosting.Azure.Storage\AzureStorageEmulatorConnectionString.cs (3)
35
builder.Append($"{key}={endpoint.
Property
(EndpointProperty.Scheme)}://{endpoint.
Property
(EndpointProperty.IPV4Host)}:{endpoint.
Property
(EndpointProperty.Port)}/devstoreaccount1;");
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (2)
65
context.EnvironmentVariables["TP"] = resource.GetEndpoint("http").
Property
(EndpointProperty.TargetPort);
66
context.EnvironmentVariables["TPH2"] = resource.GetEndpoint("h2").
Property
(EndpointProperty.TargetPort);
Aspire.Hosting.Garnet (3)
GarnetResource.cs (3)
34
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
39
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
65
builder.Append($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Kafka (9)
KafkaBuilderExtensions.cs (6)
140
? ReferenceExpression.Create($"{endpoint.Resource.Name}:{endpoint.
Property
(EndpointProperty.TargetPort)}")
141
: ReferenceExpression.Create($"{endpoint.
Property
(EndpointProperty.HostAndPort)}");
218
? ReferenceExpression.Create($"PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:{primaryEndpoint.Port.ToString(CultureInfo.InvariantCulture)},PLAINTEXT_INTERNAL://{resource.Name}:{internalEndpoint.
Property
(EndpointProperty.TargetPort)}")
219
: ReferenceExpression.Create($"PLAINTEXT://{primaryEndpoint.
Property
(EndpointProperty.Host)}:29092,PLAINTEXT_HOST://{primaryEndpoint.
Property
(EndpointProperty.HostAndPort)},PLAINTEXT_INTERNAL://{internalEndpoint.
Property
(EndpointProperty.HostAndPort)}");
KafkaServerResource.cs (3)
31
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
36
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
48
ReferenceExpression.Create($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Milvus (3)
MilvusServerResource.cs (3)
41
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
46
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
69
public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.
Property
(EndpointProperty.Url)}");
Aspire.Hosting.MongoDB (3)
MongoDBServerResource.cs (3)
39
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
44
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
94
builder.Append($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.MySql (4)
MySqlServerResource.cs (4)
38
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
43
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
55
$"Server={PrimaryEndpoint.
Property
(EndpointProperty.Host)};Port={PrimaryEndpoint.
Property
(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter}");
Aspire.Hosting.Nats (3)
NatsServerResource.cs (3)
38
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
43
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
89
builder.Append($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.NodeJs (1)
NodeExtensions.cs (1)
152
c.Args.Add(targetEndpoint.
Property
(EndpointProperty.TargetPort));
Aspire.Hosting.Oracle (3)
OracleDatabaseServerResource.cs (3)
35
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
40
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
52
$"user id={DefaultUserName};password={PasswordParameter};data source={PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.PostgreSQL (4)
PostgresServerResource.cs (4)
57
$"Host={PrimaryEndpoint.
Property
(EndpointProperty.Host)};Port={PrimaryEndpoint.
Property
(EndpointProperty.Port)};Username={UserNameReference};Password={PasswordParameter}");
108
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
113
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
271
c.Args.Add(endpoint.
Property
(EndpointProperty.TargetPort));
Aspire.Hosting.Qdrant (8)
QdrantServerResource.cs (8)
41
public EndpointReferenceExpression GrpcHost => PrimaryEndpoint.
Property
(EndpointProperty.Host);
46
public EndpointReferenceExpression GrpcPort => PrimaryEndpoint.
Property
(EndpointProperty.Port);
56
public EndpointReferenceExpression HttpHost => HttpEndpoint.
Property
(EndpointProperty.Host);
61
public EndpointReferenceExpression HttpPort => HttpEndpoint.
Property
(EndpointProperty.Port);
68
$"Endpoint={PrimaryEndpoint.
Property
(EndpointProperty.Url)};Key={ApiKeyParameter}");
76
public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.
Property
(EndpointProperty.Url)}");
83
$"Endpoint={HttpEndpoint.
Property
(EndpointProperty.Url)};Key={ApiKeyParameter}");
91
public ReferenceExpression HttpUriExpression => ReferenceExpression.Create($"{HttpEndpoint.
Property
(EndpointProperty.Url)}");
Aspire.Hosting.RabbitMQ (3)
RabbitMQServerResource.cs (3)
44
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
49
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
93
builder.Append($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Redis (3)
RedisResource.cs (3)
37
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
42
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
52
builder.Append($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
Aspire.Hosting.Seq (4)
SeqResource.cs (4)
24
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
29
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
35
ReferenceExpression.Create($"{PrimaryEndpoint.
Property
(EndpointProperty.Url)}");
43
public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.
Property
(EndpointProperty.Url)}");
Aspire.Hosting.SqlServer (4)
SqlServerServerResource.cs (4)
35
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
40
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
49
$"Server={PrimaryEndpoint.
Property
(EndpointProperty.IPV4Host)},{PrimaryEndpoint.
Property
(EndpointProperty.Port)};User ID={DefaultUserName};Password={PasswordParameter};TrustServerCertificate=true");
Aspire.Hosting.Tests (37)
EndpointReferenceTests.cs (12)
36
var endpointExpr = endpointRef.
Property
(EndpointProperty.Url);
56
var endpointExpr = endpointRef.
Property
(EndpointProperty.Url);
70
var hostExpr = endpointRef.
Property
(EndpointProperty.Host);
89
var portExpr = endpointRef.
Property
(EndpointProperty.Port);
108
var schemeExpr = endpointRef.
Property
(EndpointProperty.Scheme);
122
var ipv4Expr = endpointRef.
Property
(EndpointProperty.IPV4Host);
136
var targetPortExpr = endpointRef.
Property
(EndpointProperty.TargetPort);
150
var targetPortExpr = endpointRef.
Property
(EndpointProperty.TargetPort);
169
var endpointExpr = endpointRef.
Property
(EndpointProperty.Url);
187
var expr1 = endpointRef.
Property
(EndpointProperty.Url);
188
var expr2 = endpointRef.
Property
(EndpointProperty.Host);
189
var expr3 = endpointRef.
Property
(EndpointProperty.Port);
ExpressionResolverTests.cs (19)
205
ReferenceExpression.Create($"{PrimaryEndpoint.
Property
(EndpointProperty.Url)}");
229
{ "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)}/;") },
230
{ "Url", ReferenceExpression.Create($"Url={Endpoint1.
Property
(EndpointProperty.Url)};") },
232
{ "OnlyHost", ReferenceExpression.Create($"Host={Endpoint1.
Property
(EndpointProperty.Host)};") },
233
{ "OnlyPort", ReferenceExpression.Create($"Port={Endpoint1.
Property
(EndpointProperty.Port)};") },
234
{ "HostAndPort", ReferenceExpression.Create($"HostPort={Endpoint1.
Property
(EndpointProperty.HostAndPort)}") },
235
{ "PortBeforeHost", ReferenceExpression.Create($"Port={Endpoint1.
Property
(EndpointProperty.Port)};Host={Endpoint1.
Property
(EndpointProperty.Host)};") },
236
{ "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)}/;") },
241
{ "UrlEncodedHost", ReferenceExpression.Create($"Host={Endpoint3.
Property
(EndpointProperty.Host):uri};") },
WithEnvironmentTests.cs (6)
236
.WithEnvironment("PORT", $"{endpoint.
Property
(EndpointProperty.Port)}")
237
.WithEnvironment("TARGET_PORT", $"{endpoint.
Property
(EndpointProperty.TargetPort)}")
284
.WithEnvironment("URL", $"{endpoint.
Property
(EndpointProperty.Host)}:{endpoint.
Property
(EndpointProperty.Port)}");
310
.WithEnvironment("TARGET_PORT", $"{endpoint.
Property
(EndpointProperty.TargetPort)}");
441
var portProperty = endpoint.
Property
(EndpointProperty.Port);
Aspire.Hosting.Valkey (3)
ValkeyResource.cs (3)
39
public EndpointReferenceExpression Host => PrimaryEndpoint.
Property
(EndpointProperty.Host);
44
public EndpointReferenceExpression Port => PrimaryEndpoint.
Property
(EndpointProperty.Port);
65
builder.Append($"{PrimaryEndpoint.
Property
(EndpointProperty.HostAndPort)}");
AspireWithNode.AppHost (1)
NodeHostingExtensions.cs (1)
26
context.EnvironmentVariables["HTTPS_REDIRECT_PORT"] = ReferenceExpression.Create($"{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)}");