// Watcher events private void OnChanged(object sender, FileSystemEventArgs e) { // Get file path (relative to base path) string path = e.FullPath.Remove(0, _basePath.Length); // Abort if file is not loaded if (!_content.ContainsKey(path)) // Check if file is not used for any content { return; } // Reload file ContentContainer cc = _content[path]; // Get content container if (cc.LoadedAsync) // Check if file should be loaded asynchronously or not { LoadFromFileAsync(cc); } else { LoadFromFile(cc); } }
internal bool ContainsContent(ContentContainer content) { return(_content.ContainsValue(content)); }