private static void ResetUsageData(object sender, EventArgs e) { DocumentFactory.Clear(); UsageRegistry.Reset(); MessageDisplayManager.Refresh(); UnusedCssExtension.All(x => x.BlipRecording()); }
public static IReadOnlyCollection <IStylingRule> GetAllRules() { //This lookup needs to be Project -> Browser -> Page (but page -> sheets should be tracked internally by the extension) var files = UnusedCssExtension.GetValidSheetUrls(); var allRules = new List <IStylingRule>(); foreach (var file in files) { var store = DocumentFactory.GetDocument(file.ToLowerInvariant(), true); if (store != null) { store.IsProcessingUnusedCssRules = true; var rules = store.Rules; if (rules != null) { allRules.AddRange(rules); } else { DocumentFactory.UnregisterDocument(store); } } } return(allRules); }
private void CleanUpWarnings(object sender, FileSystemEventArgs e) { DocumentFactory.UnregisterDocument(this); UsageRegistry.Resynchronize(); }