ChangeMonitor.OnChanged(Object) 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 by derived classes to raise the event when a dependency changes.
protected:
void OnChanged(System::Object ^ state);
protected void OnChanged (object state);
member this.OnChanged : obj -> unit
Protected Sub OnChanged (state As Object)
Parameters
- state
- Object
The data for the change event. This value can be null
.
Remarks
Typically, the OnChanged method is called when dependency changes occur. The OnChanged method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked.
If the OnChanged method is called before the NotifyOnChanged method is called, the state data from the call to the OnChanged method is saved by the cache implementation. Also, the callback to the OnChangedCallback method is invoked immediately when the NotifyOnChanged method is invoked.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈