6
6
7
7
namespace Aspire . Hosting . ApplicationModel ;
8
8
9
+ /// <summary>
10
+ /// Represents an endpoint allocated for a service instance.
11
+ /// </summary>
9
12
[ DebuggerDisplay ( "Type = {GetType().Name,nq}, Name = {Name}, UriString = {UriString}, BindingNameQualifiedUriString = {BindingNameQualifiedUriString}" ) ]
10
13
public class AllocatedEndpointAnnotation : IResourceAnnotation
11
14
{
15
+ /// <summary>
16
+ /// Initializes a new instance of the <see cref="AllocatedEndpointAnnotation"/> class.
17
+ /// </summary>
18
+ /// <param name="name">The name of the endpoint.</param>
19
+ /// <param name="protocol">The protocol used by the endpoint.</param>
20
+ /// <param name="address">The IP address of the endpoint.</param>
21
+ /// <param name="port">The port number of the endpoint.</param>
22
+ /// <param name="scheme">The URI scheme used by the endpoint.</param>
12
23
public AllocatedEndpointAnnotation ( string name , ProtocolType protocol , string address , int port , string scheme )
13
24
{
14
25
ArgumentNullException . ThrowIfNullOrEmpty ( name ) ;
@@ -48,6 +59,9 @@ public AllocatedEndpointAnnotation(string name, ProtocolType protocol, string ad
48
59
/// </summary>
49
60
public string UriScheme { get ; private set ; }
50
61
62
+ /// <summary>
63
+ /// Endpoint in string representation formatted as <c>"Address:Port"</c>.
64
+ /// </summary>
51
65
public string EndPointString => $ "{ Address } :{ Port } ";
52
66
53
67
/// <summary>
@@ -59,5 +73,10 @@ public AllocatedEndpointAnnotation(string name, ProtocolType protocol, string ad
59
73
/// URI in string representation.
60
74
/// </summary>
61
75
public string UriString => $ "{ UriScheme } ://{ EndPointString } ";
76
+
77
+ /// <summary>
78
+ /// Returns a string representation of the allocated endpoint URI.
79
+ /// </summary>
80
+ /// <returns>The URI string, <see cref="UriString"/>.</returns>
62
81
public override string ToString ( ) => UriString ;
63
82
}
0 commit comments