Esempio n. 1
0
 private static void ResetUsageData(object sender, EventArgs e)
 {
     DocumentFactory.Clear();
     UsageRegistry.Reset();
     MessageDisplayManager.Refresh();
     UnusedCssExtension.All(x => x.BlipRecording());
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 private void CleanUpWarnings(object sender, FileSystemEventArgs e)
 {
     DocumentFactory.UnregisterDocument(this);
     UsageRegistry.Resynchronize();
 }