Bu içerik dilinizde bulunmamaktadır ancak İngilizce sürümüne buradan bakabilirsiniz.

RoleInstance.Role Property


Gets the Role object that is associated with the role instance.

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

public abstract Role Role { get; internal set; }

The following code example shows how to retrieve the name of the role that is associated with the role instance:

foreach (var role in RoleEnvironment.Roles) 
   foreach (var roleInstance in role.Value.Instances)      
      Trace.WriteLine("Role for the instance: " + roleInstance.Role.Name, "Information");
Return to top