System.Web 2.0.0.0

Objects must implement the interface in order to register with the hosting environment and have their lifetime managed by the hosting environment.

You can create an instance of a registered object by calling the method on the application manager. The application manager returns the newly created object to the caller, which can then call a type-specific method on the object. During startup, the registered object should call the method to complete registration of the object.

When the application manager needs to stop a registered object, it will call the method.

Applications can have only one instance of a registered type. To create multiple instances of a registered type, use the factory pattern to create an object manager that is registered with the application and then manages the multiple instances. For an example of an object implementing the factory pattern, see the example for the class.

Defines methods for objects that are managed by the hosting environment.

- Method
  System.Void ``

  The application manager will call the method to ask a registered object to unregister. During processing of the method, the registered object must call the method.

  The method is first called with the parameter set to false. The object can either complete processing, call the method, and then return or it can return immediately and complete processing asynchronously before calling the method.

  If the registered object does not complete processing before the application manager's time-out period expires, the method is called again with the parameter set to true. When the parameter is true, the registered object must call the method before returning; otherwise, its registration will be removed by the application manager.

  Requests a registered object to unregister.

  true to indicate the registered object should unregister from the hosting environment before returning; otherwise, false. 2.0.0.0