public void RemoveWatcher(ICacheWatcher watcher) { // Remove the watcher. _watchers.Remove(watcher); // If there are no more watchers, remove this from the cache list. if (_watchers.Count == 0) { Cache.RemoveElement(this); } }
public static T FromFile(ICacheWatcher watcher, string file, Func <Uri, T> makeFile) => FromUri(watcher, new Uri(file), makeFile);
public static T FromUri(ICacheWatcher watcher, Uri uri, Func <Uri, T> makeFile) => watcher.Get <T>(new FileIdentifier <T>(uri, makeFile));
public void AddWatcher(ICacheWatcher watcher) => _watchers.Add(watcher);