System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.IDisposable

If you add an item to the cache that is dependent on another object, such as a file or array of files, the dependent item is automatically removed from the cache when the object changes. For example, suppose you create a object based on data in an XML file. You can add the to the cache with a object that makes the dependent on the XML file. If the XML file changes, the is removed from the cache.

You can add items with dependencies to your application's cache with the and methods. You cannot use the property to add items to the cache with dependencies.

To set up a dependency, you create an instance of the class, specifying the files, keys, or directories on which the item is dependent, and then pass the dependency to the or method. The instance can represent a single file or directory, an array of files or directories, or an array of files or directories along with an array of cache keys (these represent other items stored in the object).

Establishes a dependency relationship between an item stored in an ASP.NET application's object and a file, cache key, an array of either, or another object. The class monitors the dependency relationships so that when any of them changes, the cached item will be automatically removed.

- Constructor
  2.0.0.0

  If you want to derive your own class from , implement this version of the constructor.

  Initializes a new instance of the class.

- Constructor

  If the directory or file specified in the parameter is not found in the file system, it will be treated as missing. If the directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when the directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Initializes a new instance of the class that monitors a file or directory for changes.

  The path to a file or directory that the cached object is dependent upon. When this resource changes, the cached object becomes obsolete and is removed from the cache.
  1.0.5000.0
  2.0.0.0
- Constructor

  If any of the files or directories in the array changes or is removed from the array, the cached item becomes obsolete and is removed from the application's object.

  Also, if any of the directories or files specified in the parameter is not found in the file system, it is treated as missing. If a directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when that directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  When you create the array that contains the file dependencies, you must define the number of files that the item you are adding to the is dependent on.

  Initializes a new instance of the class that monitors an array of paths (to files or directories) for changes.

  An array of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached object becomes obsolete and is removed from the cache.
  1.0.5000.0
  2.0.0.0
- Constructor

  If the directory or file specified in the parameter is not found in the file system, it will be treated as missing. If the directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when the directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Change tracking begins immediately and is not directly based on the parameter. Use the parameter to pass a date and time in the past against which you want to check the last modified date of the directory or file passed in the parameter. If the last modified date is later than the date and time set passed in the parameter, the cached item is removed from the .

  Initializes a new instance of the class that monitors a file or directory for changes.

  The path to a file or directory that the cached object is dependent upon. When this resource changes, the cached object becomes obsolete and is removed from the cache.
  The time against which to check the last modified date of the directory or file.
  1.0.5000.0
  2.0.0.0
- Constructor

  If any of the directories or files specified in the parameter is not found in the file system, it is treated as missing. If a directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when that directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Change tracking begins immediately and is not directly based on the parameter. Use the parameter to pass a date and time in the past against which you want to check the last modified date of the array passed in the parameter. If the last modified date of any object in the array is later than the date and time set passed in the parameter, the cached item is removed from the .

  Initializes a new instance of the class that monitors an array of paths (to files or directories) for changes and specifies a time when change monitoring begins.

  An array of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached object becomes obsolete and is removed from the cache.
  The time against which to check the last modified date of the objects in the array.
  1.0.5000.0
  2.0.0.0
- Constructor

  Also, if any of the directories or files specified in the parameter is not found in the file system, it is treated as missing. If a directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when that directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Initializes a new instance of the class that monitors an array of paths (to files or directories), an array of cache keys, or both for changes.

  An array of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached object becomes obsolete and is removed from the cache.
  An array of cache keys that the new object monitors for changes. When any of these cache keys changes, the cached object associated with this dependency object becomes obsolete and is removed from the cache.
  1.0.5000.0
  2.0.0.0
- Constructor

  Also, if any of the directories or files specified in the parameter is not found in the file system, it is treated as missing. If a directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when that directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Change tracking begins immediately and is not directly based on the parameter. Use the parameter to pass a date and time in the past against which you want to check the last modified date of any object passed in the or parameters. If the last modified date of any of those objects is later than the date and time set passed in the parameter, the cached item is removed from the .

  Initializes a new instance of the class that monitors an array of paths (to files or directories), an array of cache keys, or both for changes.

  An array of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached object becomes obsolete and is removed from the cache.
  An array of cache keys that the new object monitors for changes. When any of these cache keys changes, the cached object associated with this dependency object becomes obsolete and is removed from the cache.
  The date and time against which to check the last modified date of the objects passed in the and arrays.
  1.0.5000.0
  2.0.0.0
- Constructor

  Also, if any of the directories or files specified in the parameter is not found in the file system, it is treated as missing. If a directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when that directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Initializes a new instance of the class that monitors an array of paths (to files or directories), an array of cache keys, or both for changes. It also makes itself dependent upon a separate instance of the class.

  An array of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached object becomes obsolete and is removed from the cache.
  An array of cache keys that the new object monitors for changes. When any of these cache keys changes, the cached object associated with this dependency object becomes obsolete and is removed from the cache.
  Another instance of the class that this instance is dependent upon.
  1.0.5000.0
  2.0.0.0
- Constructor

  Also, if any of the directories or files specified in the parameter is not found in the file system, it is treated as missing. If a directory or file is missing when the object with the dependency is added to the , the cached object will be removed from the when that directory or file is created.

  For example, assume that you add an object to the with a dependency on the following file path: c:\stocks\xyz.dat. If that file is not found when the object is created, but is created later, the cached object is removed upon the creation of the xyz.dat file.

  Change tracking begins immediately and is not directly based on the parameter. Use the parameter to pass a date and time in the past against which you want to check the last modified date of any of the objects passed in the , , or parameters. If the last modified date for any of those objects is later than the date and time passed in the parameter, the cached item is removed from the .

  Initializes a new instance of the class that monitors an array of paths (to files or directories), an array of cache keys, or both for changes. It also makes itself dependent upon another instance of the class and a time when the change monitoring begins.

  An array of paths (to files or directories) that the cached object is dependent upon. When any of these resources changes, the cached object becomes obsolete and is removed from the cache.
  An array of cache keys that the new object monitors for changes. When any of these cache keys changes, the cached object associated with this dependency object becomes obsolete and is removed from the cache.
  Another instance of the class that this instance is dependent upon.
  The time against which to check the last modified date of the objects in the arrays and the object.
  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void

  Any class that derives from the class is required to implement this method to clean up resources the derived class has used.

  Releases the resources used by the class and any classes that derive from .

- Method
  System.Void To be added

  Releases the resources used by the object.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void

  The method completes the initialization of the object. This method is called by all constructors.

  Completes initialization of the object.

- Method
  2.0.0.0
  System.String

  This method can be particularly useful for tracking multiple instances of the class associated with an item or an application.

  The identifier is a combination of either the file name (for a file dependency) or the key name (for a cache-key dependency) and a string that this method assigns to the dependency. In classes that derive from the class, you can override this method to customize how it generates the unique identifier.

  Retrieves a unique identifier for a object.

  The unique identifier for the object.

- Property
  System.Boolean To be added: an object of type 'bool'

  You can add an item to an ASP.NET application's with a . When the changes, the item added to the is invalidated and removed from the cache. You can use this property to determine whether a has changed, and recreate the item in the if that has occurred.

  Gets a value indicating whether the object has changed.

  1.0.5000.0
  2.0.0.0
- Method
  2.0.0.0
  System.Void `` ``

  Any class that derives from the class must implement this method.

  When you derive from the class, you use the base functionality of any method or property that you have not overridden. When you create an instance of the derived class, it represents the files, cache keys, database tables, or other arbitrary objects that you want to make a cached item dependent upon. When a dependency item changes, this method notifies the base functionality of the class that the item has changed, so that the values of the and properties can be updated.

  Notifies the base object that the dependency represented by a derived class has changed.

  The source of the event. An object that contains the event data.
- Method
  2.0.0.0
  System.Void `` To be added.

  Marks the time when a dependency last changed.

  The time when the dependency last changed.
- Property
  2.0.0.0
  System.DateTime To be added.

  This property is measured in Coordinated Universal Time (UTC) (also known as Greenwich Mean Time).

  Gets the time when the dependency was last changed.