protected virtual void FileSystemWatcher_Changed(object sender, FileSystemEventArgs e) { try { var file = views.GetVirtualFile(e.FullPath); if (file == null || !views.IsWatchedFile(file)) { return; } RazorPage page = views.GetPage(file); if (page != null) { views.InvalidatePage(page); } } catch (Exception ex) { Log.Warn("FileSystemWatcher_Changed error: ", ex); } }
protected virtual void FileSystemWatcher_Changed(object sender, FileSystemEventArgs e) { try { var file = views.GetVirutalFile(e.FullPath); if (file == null || !views.IsWatchedFile(file)) { return; } var pagePath = views.GetDictionaryPagePath(file); RazorPage page; if (views.Pages.TryGetValue(pagePath, out page)) { views.InvalidatePage(page); } } catch (Exception ex) { Log.Warn("FileSystemWatcher_Changed error: ", ex); } }