Export (0) Print
Expand All

ChangeMonitor.OnChanged Method

Called by derived classes to raise the event when a dependency changes.

Namespace:  System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

protected void OnChanged(
	Object state
)

Parameters

state
Type: System.Object

The data for the change event. This value can be null.

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft