RoleInstanceEndpoint.RoleInstance Property
Gets the RoleInstance object that is associated with an endpoint.
Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Syntax
public abstract RoleInstance RoleInstance { get; internal set; }
public:
property RoleInstance^ RoleInstance {
virtual RoleInstance^ get() abstract;
internal: virtual void set(RoleInstance^ value) abstract;
}
abstract RoleInstance : RoleInstance with get, internal set
Public MustOverride Property RoleInstance As RoleInstance
Get
Friend Set
End Property
Property Value
Type: Microsoft.WindowsAzure.ServiceRuntime.RoleInstance
Type: Microsoft.WindowsAzure.ServiceRuntime.RoleInstance
An instance of RoleInstance.
Remarks
The following code example shows how to retrieve the role instance that is associated with the endpoints:
foreach (var role in RoleEnvironment.Roles)
{
foreach (var roleInst in role.Value.Instances)
{
foreach (RoleInstanceEndpoint instanceEndpoint in roleInst.InstanceEndpoints.Values)
{
Trace.WriteLine("Role instance ID: " + instanceEndpoint.RoleInstance.Id, "Information");
}
}
}
See Also
RoleEnvironment
RoleInstanceEndpoint Class
Microsoft.WindowsAzure.ServiceRuntime Namespace
Return to top