ChangeMonitor.InitializationComplete Method
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.
Called from the constructor of derived classes to indicate that initialization is finished.
protected:
void InitializationComplete();
protected void InitializationComplete ();
member this.InitializationComplete : unit -> unit
Protected Sub InitializationComplete ()
Remarks
If a dependency changes before initialization is complete in a derived class, the constructor of the derived class must invoke the OnChanged method.
When the OnChanged method is invoked, the HasChanged property is automatically set to true
by the change monitor. As a result, when the change monitor's constructor calls the InitializationComplete method, the base class will automatically call the Dispose method. If initialization is complete, the OnChanged method automatically disposes the derived change-monitor instance.
Notes to Inheritors
The constructor of a derived class must call the base InitializationComplete() method before the constructor returns. The constructor of a derived class can call the Dispose() method only after InitializationComplete() is called, because the Dispose() method throws an exception if initialization is not completed.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈