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:
property IDictionary<String^, RoleInstanceEndpoint^>^ InstanceEndpoints {
	virtual IDictionary<String^, RoleInstanceEndpoint^>^ get() abstract;
	internal: virtual void set(IDictionary<String^, RoleInstanceEndpoint^>^ value) abstract;
}

Property Value

Type: System.Collections.Generic::IDictionary<String^, RoleInstanceEndpoint^>^

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
Show: