Export (0) Print
Expand All

RoleInstance.InstanceEndpoints Property

Updated: December 6, 2013

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; }

Property Value

Type: System.Collections.Generic.IDictionary

A IDictionary 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"); 
      }
   }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft