IRegisteredObject Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines methods for objects that are managed by the hosting environment.
public interface class IRegisteredObject
public interface IRegisteredObject
type IRegisteredObject = interface
Public Interface IRegisteredObject
- Derived
Remarks
Objects must implement the IRegisteredObject 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 ApplicationManager.CreateObject 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 HostingEnvironment.RegisterObject method to complete registration of the object.
When the application manager needs to stop a registered object, it will call the Stop 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 ApplicationManager class.
Methods
Stop(Boolean) |
Requests a registered object to unregister. |
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기