16 references to EndpointBindingMode
Aspire.Hosting (13)
ApplicationModel\AllocatedEndpoint.cs (3)
49public AllocatedEndpoint(EndpointAnnotation endpoint, string address, int port, EndpointBindingMode bindingMode, string? containerHostAddress = null, string? targetPortExpression = null) 72: this(endpoint, address, port, EndpointBindingMode.SingleAddress, containerHostAddress, targetPortExpression) 90public EndpointBindingMode BindingMode { get; private set; }
Dcp\DcpExecutor.cs (8)
1652private static (string, EndpointBindingMode) NormalizeTargetHost(string targetHost) 1656null or "" => ("localhost", EndpointBindingMode.SingleAddress), // Default is localhost 1657var s when string.Equals(s, "localhost", StringComparison.OrdinalIgnoreCase) => ("localhost", EndpointBindingMode.SingleAddress), // Explicitly set to localhost 1658var s when s.Length > 10 && s.EndsWith(".localhost", StringComparison.OrdinalIgnoreCase) => ("localhost", EndpointBindingMode.SingleAddress), // Explicitly set to localhost when using .localhost subdomain 1661var ip when IPAddress.Any.Equals(ip) => ("localhost", EndpointBindingMode.IPv4AnyAddresses), // 0.0.0.0 (IPv4 all addresses) 1662var ip when IPAddress.IPv6Any.Equals(ip) => ("localhost", EndpointBindingMode.IPv6AnyAddresses), // :: (IPv6 all addresses) 1663_ => (s, EndpointBindingMode.SingleAddress), // Any other IP address is returned as-is as that will be the only address the service is bound to 1665_ => ("localhost", EndpointBindingMode.DualStackAnyAddresses), // Any other target host is treated as binding to all IPv4 AND IPv6 addresses
Orchestrator\ApplicationOrchestrator.cs (2)
234EndpointBindingMode.SingleAddress when !allocatedEndpoint.Address.Equals(endpoint.TargetHost, StringComparison.OrdinalIgnoreCase) => new ResourceUrlAnnotation 240EndpointBindingMode.SingleAddress => null,
Aspire.Hosting.Tests (3)
WithEndpointTests.cs (3)
645Assert.Equal(EndpointBindingMode.SingleAddress, endpoint.AllocatedEndpoint.BindingMode); 652[InlineData("0.0.0.0", EndpointBindingMode.IPv4AnyAddresses)] 654public async Task TopLevelDomainSetsAnnotationValues(string host, EndpointBindingMode endpointBindingMode)