Example #1
0
 internal AnalyzerTelemetryInfo(AnalyzerActionCounts actionCounts, TimeSpan executionTime)
 {
     _actionCounts = actionCounts;
     ExecutionTime = executionTime;
 }
Example #2
0
        internal AnalyzerTelemetryInfo(AnalyzerActionCounts actionCounts, TimeSpan executionTime)
        {
            CompilationStartActionsCount = actionCounts.CompilationStartActionsCount;
            CompilationEndActionsCount = actionCounts.CompilationEndActionsCount;
            CompilationActionsCount = actionCounts.CompilationActionsCount;

            SyntaxTreeActionsCount = actionCounts.SyntaxTreeActionsCount;
            SemanticModelActionsCount = actionCounts.SemanticModelActionsCount;
            SymbolActionsCount = actionCounts.SymbolActionsCount;
            SyntaxNodeActionsCount = actionCounts.SyntaxNodeActionsCount;

            CodeBlockStartActionsCount = actionCounts.CodeBlockStartActionsCount;
            CodeBlockEndActionsCount = actionCounts.CodeBlockEndActionsCount;
            CodeBlockActionsCount = actionCounts.CodeBlockActionsCount;

            OperationActionsCount = actionCounts.OperationActionsCount;
            OperationBlockStartActionsCount = actionCounts.OperationBlockStartActionsCount;
            OperationBlockEndActionsCount = actionCounts.OperationBlockEndActionsCount;
            OperationBlockActionsCount = actionCounts.OperationBlockActionsCount;

            ExecutionTime = executionTime;
        }
Example #3
0
 private static bool HasActionsForEvent(CompilationEvent compilationEvent, AnalyzerActionCounts actionCounts)
 {
     if (compilationEvent is CompilationStartedEvent)
     {
         return actionCounts.CompilationActionsCount > 0 ||
             actionCounts.SyntaxTreeActionsCount > 0;
     }
     else if (compilationEvent is CompilationCompletedEvent)
     {
         return actionCounts.CompilationEndActionsCount > 0;
     }
     else if (compilationEvent is SymbolDeclaredCompilationEvent)
     {
         return actionCounts.SymbolActionsCount > 0 || actionCounts.HasAnyExecutableCodeActions;
     }
     else
     {
         return actionCounts.SemanticModelActionsCount > 0;
     }
 }