43 references to EndpointProperty
Aspire.Hosting (43)
ApplicationModel\EndpointReference.cs (22)
49
internal string GetExpression(
EndpointProperty
property =
EndpointProperty
.Url)
53
EndpointProperty
.Url => "url",
54
EndpointProperty
.Host or
EndpointProperty
.IPV4Host => "host",
55
EndpointProperty
.Port => "port",
56
EndpointProperty
.Scheme => "scheme",
57
EndpointProperty
.TargetPort => "targetPort",
67
/// <param name="property">The <see cref="
EndpointProperty
"/> enum value to use in the reference.</param>
68
/// <returns>An <see cref="EndpointReferenceExpression"/> representing the specified <see cref="
EndpointProperty
"/>.</returns>
69
public EndpointReferenceExpression Property(
EndpointProperty
property)
148
public class EndpointReferenceExpression(EndpointReference endpointReference,
EndpointProperty
property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences
156
/// Gets the <see cref="
EndpointProperty
"/> for the property expression.
158
public
EndpointProperty
Property { get; } = property;
170
/// <returns>A <see cref="string"/> containing the selected <see cref="
EndpointProperty
"/> value.</returns>
171
/// <exception cref="InvalidOperationException">Throws when the selected <see cref="
EndpointProperty
"/> enumeration is not known.</exception>
174
EndpointProperty
.Url => new(Endpoint.Url),
175
EndpointProperty
.Host => new(Endpoint.Host),
176
EndpointProperty
.IPV4Host => new("127.0.0.1"),
177
EndpointProperty
.Port => new(Endpoint.Port.ToString(CultureInfo.InvariantCulture)),
178
EndpointProperty
.Scheme => new(Endpoint.Scheme),
179
EndpointProperty
.TargetPort => new(ComputeTargetPort()),
ApplicationModel\ExpressionResolver.cs (15)
25
async Task<string?> EvalEndpointAsync(EndpointReference endpointReference,
EndpointProperty
property)
39
if (property is
EndpointProperty
.Host or
EndpointProperty
.IPV4Host)
43
else if (property ==
EndpointProperty
.Port)
47
else if (property ==
EndpointProperty
.Url)
68
(
EndpointProperty
.Host or
EndpointProperty
.IPV4Host, true, true) => target.Name,
69
(
EndpointProperty
.Port, true, true) => await endpointReference.Property(
EndpointProperty
.TargetPort).GetValueAsync(cancellationToken).ConfigureAwait(false),
71
(
EndpointProperty
.Host or
EndpointProperty
.IPV4Host, false, _) => containerHostName,
72
(
EndpointProperty
.Url, _, _) => string.Format(CultureInfo.InvariantCulture, "{0}://{1}:{2}",
74
await EvalEndpointAsync(endpointReference,
EndpointProperty
.Host).ConfigureAwait(false),
75
await EvalEndpointAsync(endpointReference,
EndpointProperty
.Port).ConfigureAwait(false)),
145
EndpointReference endpointReference => await EvalEndpointAsync(endpointReference,
EndpointProperty
.Url).ConfigureAwait(false),
ProjectResourceBuilderExtensions.cs (5)
671
context.EnvironmentVariables["ASPNETCORE_HTTPS_PORT"] = e.Property(
EndpointProperty
.Port);
679
aspnetCoreUrls.Append($"{e.Property(
EndpointProperty
.Scheme)}://{targetHost}:{e.Property(
EndpointProperty
.TargetPort)}");
724
ports.Append($"{e.Property(
EndpointProperty
.TargetPort)}");
756
var url = ReferenceExpression.Create($"{e.EndpointAnnotation.UriScheme}://{host}:{e.Property(
EndpointProperty
.TargetPort)}");
ResourceBuilderExtensions.cs (1)
544
context.EnvironmentVariables[env] = endpointReference.Property(
EndpointProperty
.TargetPort);