4 instantiations of NetworkIdentifier
Aspire.Hosting (4)
ApplicationModel\Network.cs (3)
19
public static readonly NetworkIdentifier LocalhostNetwork = new
NetworkIdentifier
("localhost");
24
public static readonly NetworkIdentifier PublicInternet = new
NetworkIdentifier
(".");
29
public static readonly NetworkIdentifier DefaultAspireContainerNetwork = new
NetworkIdentifier
("aspire-container-network");
Dcp\DcpExecutor.cs (1)
983
var networkID = new
NetworkIdentifier
(ts.ContainerNetworkName!);
36 references to NetworkIdentifier
Aspire.Hosting (33)
ApplicationModel\AllocatedEndpoint.cs (2)
54
NetworkIdentifier
? networkID = null
142
public
NetworkIdentifier
NetworkID { get; private set; }
ApplicationModel\EndpointAnnotation.cs (5)
25
private readonly
NetworkIdentifier
_networkID;
75
NetworkIdentifier
? networkID,
198
public
NetworkIdentifier
DefaultNetworkID => _networkID;
247
public record class NetworkEndpointSnapshot(ValueSnapshot<AllocatedEndpoint> Snapshot,
NetworkIdentifier
NetworkID);
272
public bool TryAdd(
NetworkIdentifier
networkID, ValueSnapshot<AllocatedEndpoint> snapshot)
ApplicationModel\EndpointReference.cs (7)
18
private readonly
NetworkIdentifier
? _contextNetworkID;
74
public
NetworkIdentifier
? ContextNetworkID => _contextNetworkID;
181
/// or host processes calling container via mapped ports). If a <see cref="
NetworkIdentifier
"/> is specified, the <see cref="EndpointReference"/>
182
/// will always resolve in the context of that network. If the <see cref="
NetworkIdentifier
"/> is null, the reference will attempt to resolve itself
185
public EndpointReference(IResourceWithEndpoints owner, EndpointAnnotation endpoint,
NetworkIdentifier
? contextNetworkID)
217
public EndpointReference(IResourceWithEndpoints owner, string endpointName,
NetworkIdentifier
? contextNetworkID = null)
282
var
networkContext = Endpoint.ContextNetworkID ?? context.GetNetworkIdentifier();
ApplicationModel\EndpointReferenceAnnotation.cs (1)
15
public
NetworkIdentifier
ContextNetworkID { get; set; } = KnownNetworkIdentifiers.LocalhostNetwork;
ApplicationModel\ExpressionResolver.cs (1)
98
var
networkContext = context.GetNetworkIdentifier();
ApplicationModel\HostUrl.cs (1)
25
var
networkContext = context.GetNetworkIdentifier();
ApplicationModel\IValueProvider.cs (1)
24
public
NetworkIdentifier
? Network { get; init; }
ApplicationModel\Network.cs (3)
19
public static readonly
NetworkIdentifier
LocalhostNetwork = new NetworkIdentifier("localhost");
24
public static readonly
NetworkIdentifier
PublicInternet = new NetworkIdentifier(".");
29
public static readonly
NetworkIdentifier
DefaultAspireContainerNetwork = new NetworkIdentifier("aspire-container-network");
ApplicationModel\ResourceExtensions.cs (4)
364
internal static
NetworkIdentifier
GetDefaultResourceNetwork(this IResource resource)
369
internal static IEnumerable<
NetworkIdentifier
> GetSupportedNetworks(this IResource resource)
687
public static IEnumerable<EndpointReference> GetEndpoints(this IResourceWithEndpoints resource,
NetworkIdentifier
contextNetworkID)
725
public static EndpointReference GetEndpoint(this IResourceWithEndpoints resource, string endpointName,
NetworkIdentifier
contextNetworkID)
ApplicationModel\ResourceUrlsCallbackContext.cs (1)
41
public EndpointReference? GetEndpoint(string name,
NetworkIdentifier
contextNetworkID) =>
ApplicationModel\ValueProviderExtensions.cs (1)
8
public static
NetworkIdentifier
GetNetworkIdentifier(this ValueProviderContext context)
Dcp\DcpExecutor.cs (1)
983
var
networkID = new NetworkIdentifier(ts.ContainerNetworkName!);
ResourceBuilderExtensions.cs (5)
811
/// Exposes an endpoint on a resource. A reference to this endpoint can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string,
NetworkIdentifier
)"/>.
867
/// Exposes an endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string,
NetworkIdentifier
)"/>.
887
/// Exposes an HTTP endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string,
NetworkIdentifier
)"/>.
907
/// Exposes an HTTPS endpoint on a resource. This endpoint reference can be retrieved using <see cref="ResourceBuilderExtensions.GetEndpoint{T}(IResourceBuilder{T}, string,
NetworkIdentifier
)"/>.
961
public static EndpointReference GetEndpoint<T>(this IResourceBuilder<T> builder, [EndpointName] string name,
NetworkIdentifier
contextNetworkID) where T : IResourceWithEndpoints
Aspire.Hosting.Testing (3)
DistributedApplicationHostingTestingExtensions.cs (3)
84
public static Uri GetEndpointForNetwork(this DistributedApplication app, string resourceName,
NetworkIdentifier
? networkIdentifier, string? endpointName = default)
108
static string GetEndpointUriStringCore(DistributedApplication app, string resourceName, string? endpointName = default,
NetworkIdentifier
? networkIdentifier = default)
143
static EndpointReference? GetEndpointOrDefault(IResourceWithEndpoints resourceWithEndpoints, string endpointName,
NetworkIdentifier
? networkIdentifier = default)