RoleInstance.InstanceEndpoints Property

 

Gets the set of endpoints that are associated with the role instance.

Namespace:   Microsoft.WindowsAzure.ServiceRuntime
Assembly:  Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)

Public MustOverride Property InstanceEndpoints As IDictionary(Of String, RoleInstanceEndpoint)
	Get
	Friend Set
End Property

Property Value

Type: System.Collections.Generic.IDictionary(Of StringRoleInstanceEndpoint)

Type: System.Collections.Generic.IDictionary

A IDictionary(Of TKey, TValue) that contains the list of endpoints that are defined for a role.

The following code example shows how to retrieve endpoint information from role instances:


foreach (var role in RoleEnvironment.Roles) 
{
   foreach (var roleInstance in role.Value.Instances)      
   {
      foreach (RoleInstanceEndpoint instanceEndpoint in roleInstance.InstanceEndpoints.Values) 
      {
         Trace.WriteLine("Instance endpoint IP address and port: " + instanceEndpoint.IPEndpoint, "Information"); 
      }
   }
}
Return to top
Show: