Export (0) Print
Expand All

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 abstract IDictionary<string, RoleInstanceEndpoint> InstanceEndpoints { get; internal set; }

Property Value

Type: System.Collections.Generic.IDictionary<StringRoleInstanceEndpoint>

Type: System.Collections.Generic.IDictionary

A IDictionary<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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft