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)

Syntax

public abstract IDictionary<string, RoleInstanceEndpoint> InstanceEndpoints { get; internal set; }
public:
property IDictionary<String^, RoleInstanceEndpoint^>^ InstanceEndpoints {
    virtual IDictionary<String^, RoleInstanceEndpoint^>^ get() abstract;
    internal: virtual void set(IDictionary<String^, RoleInstanceEndpoint^>^ value) abstract;
}
abstract InstanceEndpoints : IDictionary<string, RoleInstanceEndpoint> with get, internal set
Public MustOverride Property InstanceEndpoints As IDictionary(Of String, RoleInstanceEndpoint)
    Get
    Friend Set
End Property

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.

Remarks

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

See Also

RoleEnvironment
RoleInstance Class
Microsoft.WindowsAzure.ServiceRuntime Namespace

Return to top