Duration (Pacific Standard Time):
To (Pacific Standard Time):
Impact:
  • None
User Action:
  • None

RoleEnvironment.CurrentRoleInstance Property

Updated: December 6, 2013

Gets a RoleInstance object that represents the role instance in which the code is currently running.

Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Public Shared ReadOnly Property CurrentRoleInstance As RoleInstance
J#

Property Value

Type: Microsoft.WindowsAzure.ServiceRuntime.RoleInstance

An instance of RoleInstance.

A role is a component of an application that performs specific functionality, such as running a website or performing background tasks. A role instance is a running copy of the role in Windows Azure or the Windows Azure Compute Emulator. A role must have endpoints defined to communicate internally and externally. The following code example shows how to retrieve endpoint information for the current role instance:

No code example is currently available or this language may not be supported.

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