Share via


EndpointAnnotation Constructors

Definition

Overloads

EndpointAnnotation(ProtocolType, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Boolean)

Source:
EndpointAnnotation.cs
Source:
EndpointAnnotation.cs
Source:
EndpointAnnotation.cs
Source:
EndpointAnnotation.cs
Source:
EndpointAnnotation.cs
Source:
EndpointAnnotation.cs
Source:
EndpointAnnotation.cs

Initializes a new instance of EndpointAnnotation.

public EndpointAnnotation(System.Net.Sockets.ProtocolType protocol, string? uriScheme = default, string? transport = default, string? name = default, int? port = default, int? targetPort = default, bool? isExternal = default, bool isProxied = true);
new Aspire.Hosting.ApplicationModel.EndpointAnnotation : System.Net.Sockets.ProtocolType * string * string * string * Nullable<int> * Nullable<int> * Nullable<bool> * bool -> Aspire.Hosting.ApplicationModel.EndpointAnnotation
Public Sub New (protocol As ProtocolType, Optional uriScheme As String = Nothing, Optional transport As String = Nothing, Optional name As String = Nothing, Optional port As Nullable(Of Integer) = Nothing, Optional targetPort As Nullable(Of Integer) = Nothing, Optional isExternal As Nullable(Of Boolean) = Nothing, Optional isProxied As Boolean = true)

Parameters

protocol
ProtocolType

Network protocol: TCP or UDP are supported today, others possibly in future.

uriScheme
String

If a service is URI-addressable, this is the URI scheme to use for constructing service URI.

transport
String

Transport that is being used (e.g. http, http2, http3 etc).

name
String

Name of the service.

port
Nullable<Int32>

Desired port for the service.

targetPort
Nullable<Int32>

This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.

isExternal
Nullable<Boolean>

Indicates that this endpoint should be exposed externally at publish time.

isProxied
Boolean

Specifies if the endpoint will be proxied by DCP. Defaults to true.

Applies to

EndpointAnnotation(ProtocolType, NetworkIdentifier, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Boolean)

Source:
EndpointAnnotation.cs

Initializes a new instance of EndpointAnnotation.

public EndpointAnnotation(System.Net.Sockets.ProtocolType protocol, Aspire.Hosting.ApplicationModel.NetworkIdentifier? networkID, string? uriScheme = default, string? transport = default, string? name = default, int? port = default, int? targetPort = default, bool? isExternal = default, bool isProxied = true);
new Aspire.Hosting.ApplicationModel.EndpointAnnotation : System.Net.Sockets.ProtocolType * Aspire.Hosting.ApplicationModel.NetworkIdentifier * string * string * string * Nullable<int> * Nullable<int> * Nullable<bool> * bool -> Aspire.Hosting.ApplicationModel.EndpointAnnotation
Public Sub New (protocol As ProtocolType, networkID As NetworkIdentifier, Optional uriScheme As String = Nothing, Optional transport As String = Nothing, Optional name As String = Nothing, Optional port As Nullable(Of Integer) = Nothing, Optional targetPort As Nullable(Of Integer) = Nothing, Optional isExternal As Nullable(Of Boolean) = Nothing, Optional isProxied As Boolean = true)

Parameters

protocol
ProtocolType

Network protocol: TCP or UDP are supported today, others possibly in future.

networkID
NetworkIdentifier

The ID of the network that is the "default" network for the Endpoint. <param name="uriScheme">If a service is URI-addressable, this is the URI scheme to use for constructing service URI.</param><param name="transport">Transport that is being used (e.g. http, http2, http3 etc).</param><param name="name">Name of the service.</param><param name="port">Desired port for the service.</param><param name="targetPort">This is the port the resource is listening on. If the endpoint is used for the container, it is the container port.</param><param name="isExternal">Indicates that this endpoint should be exposed externally at publish time.</param><param name="isProxied">Specifies if the endpoint will be proxied by DCP. Defaults to true.</param> Clients connected to the same network can reach the endpoint without any routing or network address translation.

uriScheme
String
transport
String
name
String
port
Nullable<Int32>
targetPort
Nullable<Int32>
isExternal
Nullable<Boolean>
isProxied
Boolean

Applies to