Example #1
0
        public CustomAnalysisTag RecreateForAlternativeAction(AnalysisAction altAction)
        {
            var deps = this.Dependencies;

            deps.Action = altAction;

            return(new CustomAnalysisTag(deps));
        }
Example #2
0
        private CustomAnalysisTag RepurposeTagForSupplementaryAction(CustomAnalysisTag tag, AnalysisAction suppAction)
        {
            var catd = new CustomAnalysisTagDependencies
            {
                AnalyzedElement = tag.AnalyzedElement,
                Action          = suppAction,
                ElementName     = tag.ElementName,
                FileName        = tag.FileName,
                InsertPos       = tag.InsertPosition,
                Logger          = tag.Logger,
                ProjectFilePath = tag.ProjectFilePath,
                Snapshot        = tag.Snapshot,
                //// Don't need to set VsAbstraction as tags only need it for referencing settings but supplementary actions don't need to know about settings.
            };

            if (suppAction.Location == null)
            {
                catd.Span = tag.Span;
            }
            else
            {
                catd.Span = suppAction.Location.ToSpanPlusStartPos(tag.InsertPosition);
            }

            return(new CustomAnalysisTag(catd));
        }
Example #3
0
 private void ReportProgress(string src, string output, TimeSpan time, AnalysisAction action)
 {
     lock (progressMutex)
         progressMonitor.Analysed(++taskCount, extractionTasks.Count, src, output, time, action);
 }
Example #4
0
 public void Analysed(int item, int total, string source, string output, TimeSpan time, AnalysisAction action)
 {
     if (action != AnalysisAction.UpToDate)
     {
         Logger.Log(Severity.Info, "  {0} ({1})", source,
                    action == AnalysisAction.Extracted ? time.ToString() : action == AnalysisAction.Excluded ? "excluded" : "up to date");
     }
 }
Example #5
0
 public void Analysed(int item, int total, string source, string output, TimeSpan time, AnalysisAction action)
 {
     logger.Log(Severity.Info, "[{0}/{1}] {2} ({3})", item, total, source,
                action == AnalysisAction.Extracted
             ? time.ToString()
             : action == AnalysisAction.Excluded
                 ? "excluded"
                 : "up to date");
 }
        private CustomAnalysisTag RepurposeTagForSupplementaryAction(CustomAnalysisTag tag, AnalysisAction suppAction)
        {
            var catd = new CustomAnalysisTagDependencies
            {
                AnalyzedElement = tag.AnalyzedElement,
                Action          = suppAction,
                ElementName     = tag.ElementName,
                FileName        = tag.FileName,
                InsertPos       = tag.InsertPosition,
                Logger          = tag.Logger,
                Snapshot        = tag.Snapshot,
            };

            if (suppAction.Location == null)
            {
                catd.Span = tag.Span;
            }
            else
            {
                catd.Span = suppAction.Location.ToSpanPlusStartPos(tag.InsertPosition);
            }

            return(new CustomAnalysisTag(catd));
        }