This topic has not yet been rated - Rate this topic

ChangeMonitor Constructor

Initializes a new instance of the ChangeMonitor class. This constructor is called from constructors in derived classes to initialize the base class.

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

The ChangeMonitor class has a default constructor. However, classes that inherit from the base ChangeMonitor class and define custom change-monitoring behavior must perform initialization in the constructor. For more information, see the Notes for Inheritors section.

Notes to Inheritors

The constructor of a derived class must set the UniqueId property, begin monitoring, and call the InitializationComplete class before it returns. If a dependency changes before initialization is complete (for example, if a dependent cache key is not found in the cache), the constructor must call the OnChanged method before it calls the InitializationComplete method. In this case, constructor can call the Dispose method only after the InitializationComplete method is called, because the Dispose method throws an exception if initialization is not completed.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ