Microsoft.WindowsAzure.ServiceRuntime
Represents the Windows Azure environment in which an instance of a role is running.
Retrieves the value of a setting in the service configuration file.
The name of the configuration setting.
A String containing the value of the configuration setting.
A role's configuration settings are defined in the service definition file. Values for configuration settings
are set in the service configuration file.
Populates the role information.
Reads the static role data.
Note that instance-level information is not populated.
Requests that the current role instance be stopped and restarted.
Before the role instance is recycled, the Windows Azure load balancer takes the role instance out of rotation.
This ensures that no new requests are routed to the instance while it is restarting.
A call to RequestRecycle initiates the normal operating system reboot. The current execution context
must have 'SeShutdownPrivilege' privilege.
Initializes the role runtime environment.
Initializing the runtime is optional; it is initialized automatically as needed.
Initializes the role runtime environment.
Initializing the runtime is optional; it is initialized automatically as needed.
Note that initialization blocks until the system is configured.
The amount of time to wait for initialization to complete.
Retrieves a named local storage resource.
The name of the local resource, as declared in the service definiton file.
A object that represents the local storage resource.
Occurs before a change to the service configuration is applied to the running instances of the role.
Service configuration changes are applied on-the-fly to running role instances. Configuration changes include
changes to the service configuration changes and changes to the number of instances in the service.
This event occurs after the new configuration file has been submitted to Windows Azure but
before the changes have been applied to each running role instance. This event can be cancelled
for a given instance to prevent the configuration change.
Note that cancelling this event causes the instance to be automatically recycled. When the instance is recycled,
the configuration change is applied when it restarts.
Occurs after a change to the service configuration has been applied to the running instances of the role.
Gets the set of objects defined for your service.
Roles are defined in the service definition file.
Gets a object representing the role instance in which this code is currently executing.
Indicates the status of the role instance.
An instance may indicate that it is in one of two states: Ready or Busy.
If an instance's state is Ready, it is prepared to receive requests from the load balancer. If the instance's state is Busy,
it will not receive requests from the load balancer.
Indicates whether the role instance is running in the Windows Azure environment.
true if this instance is running in the development fabric or in the
Windows Azure environment in the cloud; otherwise, false.
Indicates whether the role instance is running in the Windows Azure Compute Emulator.
true if this instance is running in the compute emulator; otherwise, false.
Occurs when the availability of the role environment has changed.
Occurs when the role instance is about to be stopped.
Gets the deployment ID, a string value that uniquely identifies the deployment in which this role instance is running.
The deployment ID.
Represents a local storage resource reserved for a service.
Gets the maximum size in megabytes allocated for the local storage resource, as defined in the service definition file.
Gets the name of the local store as declared in the service definition file.
Gets the full directory path to the local storage resource.
Arguments for the event, which occurs before a configuration change is applied to a role instance.
Set the Cancel property to cancel the configuration change.
Cancellation causes the role instance to be immediately recycled. The configuration changes are applied when the instance restarts.
Gets a collection of the configuration changes that are about to be applied to the role instance.
Arguments for the event, which occurs after a configuration change has been applied to a role instance.
Gets a collection of the configuration changes that were applied to the role instance.
Represents a change to the service's configuration.
Represents a change to the topology of the service. The service's topology refers to the number of instances
deployed for each role that the service defines.
Indicates whether two environment changes are equivalent.
Indicates whether two environment changes are equivalent.
Gets the hash code corresponding to this object.
Gets the name of the affected role.
Represents a change to a configuration setting.
Indicates whether two environment changes are equivalent.
Determines whether two changes are equivalent.
Gets the hash code corresponding to this object.
Gets the name of the configuration setting that has been changed.
Represents a role that is defined as part of a hosted service.
Gets the name of the role as it is declared in the service definition file.
Gets the collection of instances for the role.
The number of instances of a role to be deployed to Windows Azure is specified in the service's configuration file.
A role must define at least one internal endpoint in order for its set of instances to be known at runtime.
Represents a logical endpoint on a role.
Gets the name of the role endpoint.
Gets a list of all endpoints defined for a role instance.
Provides callbacks to initialize, run, and stop instances of the role.
All worker roles must extend RoleEntryPoint.
Web roles can optionally extend RoleEntryPoint, or can use the ASP.NET lifecycle management
methods to handle the role's startup and stopping sequences.
All exceptions that occur within the methods of the RoleEntryPoint class are unhandled exceptions.
Called by Windows Azure to initialize the role instance.
True if initialization succeeds, False if it fails. The default implementation returns True.
Override the OnStart method to run initialization code for your role.
Before the OnStart method returns, the instance's status is set to Busy and the instance is not available
for requests via the load balancer.
If the OnStart method returns false, the instance is immediately stopped. If the method
returns true, then Windows Azure starts the role by calling the method.
A web role can include initialization code in the ASP.NET Application_Start method instead of the OnStart method.
Application_Start is called after the OnStart method.
Any exception that occurs within the OnStart method is an unhandled exception.
Called by Windows Azure after the role instance has been initialized. This method serves as the
main thread of execution for your role.
Override the Run method to implement your own code to manage the role's execution. The Run method should implement
a long-running thread that carries out operations for the role. The default implementation sleeps for an infinite
period, blocking return indefinitely.
The role recycles when the Run method returns.
Any exception that occurs within the Run method is an unhandled exception.
Called by Windows Azure when the role instance is to be stopped.
Override the OnStop method to implement any code your role requires to shut down in an orderly fashion.
This method must return within certain period of time. If it does not, Windows Azure
will stop the role instance.
A web role can include shutdown sequence code in the ASP.NET Application_End method instead of the OnStop method.
Application_End is called before the Stopping event is raised or the OnStop method is called.
Any exception that occurs within the OnStop method is an unhandled exception.
Arguments for the event.
Represents an instance of a role.
Gets the ID of this instance.
Gets an integer value that indicates the update domain in which this instance resides.
Gets an integer value that indicates the fault domain in which this instance resides.
Gets the object associated with this instance.
Gets the set of endpoints associated with this role instance.
Represents an endpoint associated with a role instance.
Gets an object for this role instance endpoint. The object
provides the IP address and port number for the endpoint.
Gets the protocol associated with the endpoint
Gets the object associated with this endpoint.
Represents a role.
Represents a role instance.
A role instance can represent either the current instance or some other instance discovered
via an endpoint; a subclass exists for each purpose.
Creates a role instance corresponding to the current instance.
Gets or sets the deployment ID, a value which uniquely identifies the deployment in which the role instance is running.
The deployment ID.
Represents a role endpoint.
Represents a role instance endpoint.
Arguments for the event.
Specifies that the instance's status is Busy and that it should not receive requests from the load balancer at this time.
When you call SetBusy, the instance's status remains Busy for a period of 10 seconds. To extend the Busy period, call SetBusy again
after this time interval has elapsed.
Gets a value indicating the status of the role instance.
Event handlers can invoke the SetBusy method to change the status of a role instance.
If an instance's status is Ready, it is prepared to receive requests from the load balancer. If the instance's status is Busy,
it will not receive requests from the load balancer.
Indicates that the role runtime environment is not available.
This exception indicates that either the the caller is running outside the Windows Azure
environment, or that the environment is unavailable due to a critical error.
Exceptions
Status of a given role instance
The role instance is ready to accept requests.
The role instance is unavailable for requests.
Represents access to the Windows Azure runtime environment.