Delen via


RoleEntryPoint Class

 

Provides methods to run code when a role instance is initialized, run, and stopped.

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

Inheritance Hierarchy

System.Object
  Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint

Syntax

public abstract class RoleEntryPoint
public ref class RoleEntryPoint abstract 
[<AbstractClass>]
type RoleEntryPoint = class end
Public MustInherit Class RoleEntryPoint

Constructors

Name Description
System_CAPS_protmethod RoleEntryPoint()

Initializes a new instance of the RoleEntryPoint class.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod OnStart()

Runs code that initializes a role instance.

System_CAPS_pubmethod OnStop()

Runs code when a role instance is to be stopped.

System_CAPS_pubmethod Run()

Runs code that is intended to be run for the life of the role instance.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

Worker roles must extend the RoleEntryPoint class to add functionality to the role instances. Web roles can optionally extend the RoleEntryPoint class, or can use the ASP.NET lifecycle management methods to handle the start and stop sequences.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.WindowsAzure.ServiceRuntime Namespace

Return to top