50 references to LocalhostNetwork
Aspire.Hosting (19)
ApplicationModel\EndpointAnnotation.cs (1)
143
_networkId = networkId ?? KnownNetworkIdentifiers.
LocalhostNetwork
;
ApplicationModel\EndpointReference.cs (2)
280
return endpointAnnotation.AllAllocatedEndpoints.TryGetAllocatedEndpoint(_contextNetworkId ?? KnownNetworkIdentifiers.
LocalhostNetwork
, out var allocatedEndpoint)
404
EndpointProperty.IPV4Host when networkContext == KnownNetworkIdentifiers.
LocalhostNetwork
=> "127.0.0.1",
ApplicationModel\EndpointReferenceAnnotation.cs (1)
32
public NetworkIdentifier ContextNetworkId { get; set; } = KnownNetworkIdentifiers.
LocalhostNetwork
;
ApplicationModel\HostUrl.cs (2)
33
if (networkContext == KnownNetworkIdentifiers.
LocalhostNetwork
)
156
return endpoint.DefaultNetworkID == KnownNetworkIdentifiers.
LocalhostNetwork
&& endpoint.Port == port;
ApplicationModel\IValueProvider.cs (1)
54
Network = KnownNetworkIdentifiers.
LocalhostNetwork
ApplicationModel\ResourceExtensions.cs (3)
577
return resource.IsContainer() ? KnownNetworkIdentifiers.DefaultAspireContainerNetwork : KnownNetworkIdentifiers.
LocalhostNetwork
;
582
return resource.IsContainer() ? [KnownNetworkIdentifiers.DefaultAspireContainerNetwork, KnownNetworkIdentifiers.
LocalhostNetwork
] : [KnownNetworkIdentifiers.
LocalhostNetwork
];
ApplicationModel\ValueProviderExtensions.cs (1)
10
return context?.Network ?? context?.Caller?.GetDefaultResourceNetwork() ?? KnownNetworkIdentifiers.
LocalhostNetwork
;
Dashboard\DashboardEventHandlers.cs (4)
474
var otlpHttp = ((IResourceWithEndpoints)context.Resource).GetEndpoint(KnownEndpointNames.OtlpHttpEndpointName, KnownNetworkIdentifiers.
LocalhostNetwork
);
690
var otlpGrpc = dashboardResource.GetEndpoint(KnownEndpointNames.OtlpGrpcEndpointName, KnownNetworkIdentifiers.
LocalhostNetwork
);
696
var otlpHttp = dashboardResource.GetEndpoint(KnownEndpointNames.OtlpHttpEndpointName, KnownNetworkIdentifiers.
LocalhostNetwork
);
702
var frontendEndpoints = dashboardResource.GetEndpoints(KnownNetworkIdentifiers.
LocalhostNetwork
).ToList();
Dcp\DcpModelUtilities.cs (1)
259
KnownNetworkIdentifiers.
LocalhostNetwork
);
ResourceBuilderExtensions.cs (3)
1786
endpoint = new EndpointAnnotation(ProtocolType.Tcp, name: endpointName, networkId: KnownNetworkIdentifiers.
LocalhostNetwork
);
1916
networkId: KnownNetworkIdentifiers.
LocalhostNetwork
);
1972
var endpointReference = new EndpointReference(resourceWithEndpoints, endpointAnnotation, KnownNetworkIdentifiers.
LocalhostNetwork
);
Aspire.Hosting.Blazor (1)
GatewayOriginReference.cs (1)
44
Network = KnownNetworkIdentifiers.
LocalhostNetwork
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
925
var networkId = endpoint.ContextNetworkID ?? KnownNetworkIdentifiers.
LocalhostNetwork
;
Aspire.Hosting.JavaScript (1)
DenoHostingExtensions.cs (1)
420
KnownNetworkIdentifiers.
LocalhostNetwork
);
Aspire.Hosting.Kafka (1)
KafkaServerResource.cs (1)
30
public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName, KnownNetworkIdentifiers.
LocalhostNetwork
);
Aspire.Hosting.Kubernetes.Tests (1)
KubernetesPublisherTests.cs (1)
59
var origin = web.GetEndpoint("HTTP", KnownNetworkIdentifiers.
LocalhostNetwork
).BrowserOrigins;
Aspire.Hosting.Testing (1)
DistributedApplicationHostingTestingExtensions.cs (1)
304
var reference = resourceWithEndpoints.GetEndpoint(endpointName, networkIdentifier ?? KnownNetworkIdentifiers.
LocalhostNetwork
);
Aspire.Hosting.Tests (25)
AddConnectionStringTests.cs (1)
68
Network = KnownNetworkIdentifiers.
LocalhostNetwork
Dcp\DcpExecutorTests.cs (10)
10849
await AssertEndpoint(executable.Resource, "proxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 5678);
10850
await AssertEndpoint(executable.Resource, "notProxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 8765);
10871
await AssertEndpoint(executable.Resource, endpointName, KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, hostPort);
10883
await AssertEndpoint(executable.Resource, "proxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 5678);
10884
await AssertEndpoint(executable.Resource, "notProxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 8765);
10889
await AssertEndpoint(container.Resource, "proxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 15678);
10890
await AssertEndpoint(container.Resource, "notProxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 18765);
10895
await AssertEndpoint(containerWithAlias.Resource, "proxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 25678);
10896
await AssertEndpoint(containerWithAlias.Resource, "notProxied", KnownNetworkIdentifiers.
LocalhostNetwork
, KnownHostNames.Localhost, 28765);
11125
.WithEnvironment("DASHBOARD_UI", dashboard.GetEndpoint("http", KnownNetworkIdentifiers.
LocalhostNetwork
));
EndpointReferenceTests.cs (6)
23
? web.GetEndpoint("HTTP", KnownNetworkIdentifiers.
LocalhostNetwork
)
28
Assert.Equal(explicitNetwork ? KnownNetworkIdentifiers.
LocalhostNetwork
: null, endpoint.ContextNetworkID);
39
? web.GetEndpoint("http", KnownNetworkIdentifiers.
LocalhostNetwork
)
330
var annotation = new EndpointAnnotation(ProtocolType.Tcp, KnownNetworkIdentifiers.
LocalhostNetwork
, uriScheme: "http", name: "http");
462
annotation.AllAllocatedEndpoints.AddOrUpdateAllocatedEndpoint(KnownNetworkIdentifiers.
LocalhostNetwork
, allocatedEndpoint);
612
var host = resource.GetEndpoint("http", KnownNetworkIdentifiers.
LocalhostNetwork
);
ExecutionConfigurationGathererTests.cs (2)
148
KnownNetworkIdentifiers.
LocalhostNetwork
);
200
: KnownNetworkIdentifiers.
LocalhostNetwork
;
ExpressionResolverTests.cs (4)
21
Network = testData.SourceIsContainer ? KnownNetworkIdentifiers.DefaultAspireContainerNetwork : KnownNetworkIdentifiers.
LocalhostNetwork
131
Network = sourceIsContainer ? KnownNetworkIdentifiers.DefaultAspireContainerNetwork : KnownNetworkIdentifiers.
LocalhostNetwork
312
.WithEndpoint("http", ep => ep.AllocatedEndpoint = new(ep, "localhost", 8001, EndpointBindingMode.SingleAddress, "{{ targetPort }}", KnownNetworkIdentifiers.
LocalhostNetwork
));
315
.WithEnvironment("MY_CONTAINER", connectionStringResource.GetEndpoint("http", KnownNetworkIdentifiers.
LocalhostNetwork
))
Orchestrator\ApplicationOrchestratorTests.cs (2)
365
.WithEnvironment("HOST_ENDPOINT", frontend.GetEndpoint("http", KnownNetworkIdentifiers.
LocalhostNetwork
))
1112
Network = KnownNetworkIdentifiers.
LocalhostNetwork