49 references to EndpointProperty
Aspire.Hosting (49)
ApplicationModel\EndpointReference.cs (24)
49internal string GetExpression(EndpointProperty property = EndpointProperty.Url) 53EndpointProperty.Url => Binding("url"), 54EndpointProperty.Host or EndpointProperty.IPV4Host => Binding("host"), 55EndpointProperty.Port => Binding("port"), 56EndpointProperty.Scheme => Binding("scheme"), 57EndpointProperty.TargetPort => Binding("targetPort"), 58EndpointProperty.HostAndPort => $"{Binding("host")}:{Binding("port")}", 68/// <param name="property">The <see cref="EndpointProperty"/> enum value to use in the reference.</param> 69/// <returns>An <see cref="EndpointReferenceExpression"/> representing the specified <see cref="EndpointProperty"/>.</returns> 70public EndpointReferenceExpression Property(EndpointProperty property) 149public class EndpointReferenceExpression(EndpointReference endpointReference, EndpointProperty property) : IManifestExpressionProvider, IValueProvider, IValueWithReferences 157/// Gets the <see cref="EndpointProperty"/> for the property expression. 159public EndpointProperty Property { get; } = property; 171/// <returns>A <see cref="string"/> containing the selected <see cref="EndpointProperty"/> value.</returns> 172/// <exception cref="InvalidOperationException">Throws when the selected <see cref="EndpointProperty"/> enumeration is not known.</exception> 175EndpointProperty.Url => new(Endpoint.Url), 176EndpointProperty.Host => new(Endpoint.Host), 177EndpointProperty.IPV4Host => new("127.0.0.1"), 178EndpointProperty.Port => new(Endpoint.Port.ToString(CultureInfo.InvariantCulture)), 179EndpointProperty.Scheme => new(Endpoint.Scheme), 180EndpointProperty.TargetPort => new(ComputeTargetPort()), 181EndpointProperty.HostAndPort => new($"{Endpoint.Host}:{Endpoint.Port.ToString(CultureInfo.InvariantCulture)}"),
ApplicationModel\ExpressionResolver.cs (19)
25async Task<string?> EvalEndpointAsync(EndpointReference endpointReference, EndpointProperty property) 39if (property is EndpointProperty.Host or EndpointProperty.IPV4Host) 43else if (property == EndpointProperty.Port) 47else if (property is EndpointProperty.Url or EndpointProperty.HostAndPort) 66(EndpointProperty.Host or EndpointProperty.IPV4Host, true, true) => target.Name, 67(EndpointProperty.Port, true, true) => await endpointReference.Property(EndpointProperty.TargetPort).GetValueAsync(cancellationToken).ConfigureAwait(false), 69(EndpointProperty.Host or EndpointProperty.IPV4Host, false, _) => containerHostName, 70(EndpointProperty.Url, _, _) => string.Format(CultureInfo.InvariantCulture, "{0}://{1}:{2}", 72await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false), 73await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)), 74(EndpointProperty.HostAndPort, _, _) => string.Format(CultureInfo.InvariantCulture, "{0}:{1}", 75await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false), 76await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)), 181EndpointReference endpointReference when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), 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)
581context.EnvironmentVariables[env] = endpointReference.Property(EndpointProperty.TargetPort);