public void Report(IReportingContext context) { foreach (IReporter reporter in Items) { reporter.Report(context); } }
/// <inheritdoc /> public void Initialize(IStrategy <TExtension> strategy) { Ensure.ArgumentNotNull(strategy, "strategy"); this.CheckAlreadyInitialized(); this.strategy = strategy; this.reportingContext = this.strategy.CreateReportingContext(); }
public void Report(IReportingContext context) { Console.WriteLine(); Console.WriteLine(); Console.WriteLine("== Bootstrapper report =="); Console.WriteLine(); Console.WriteLine(Dump(context)); Console.WriteLine(); }
private static string Dump(IReportingContext context) { var builder = new StringBuilder(); context.Extensions.ForEach(e => Dump(e.Name, e.Description, builder, 0)); Dump(context.Run, builder); Dump(context.Shutdown, builder); return(builder.ToString()); }
private static string Dump(IReportingContext context) { var builder = new StringBuilder(); context.Extensions.ToList().ForEach(e => Dump(e.Name, e.Description, builder, 0)); Dump(context.Run, builder); Dump(context.Shutdown, builder); return builder.ToString(); }
public DefaultBootstrapperTest() { this.extensionHost = A.Fake <IExtensionHost <IExtension> >(); this.reporter = A.Fake <IReporter>(); this.strategy = A.Fake <IStrategy <IExtension> >(); this.runExecutor = A.Fake <IExecutor <IExtension> >(); this.shutdownExecutor = A.Fake <IExecutor <IExtension> >(); this.reportingContext = A.Fake <IReportingContext>(); this.extensionResolver = A.Fake <IExtensionResolver <IExtension> >(); this.testee = new DefaultBootstrapper <IExtension>(this.extensionHost, this.reporter); }
internal /* for testing purposes */ void VsixAnalyzerReportDiagnostic(IReportingContext context) { Debug.Assert(context.SyntaxTree != null, "Not expecting to be called with a null SyntaxTree"); Debug.Assert(context.Diagnostic != null, "Not expecting to be called with a null Diagnostic"); Debug.Assert(GetProjectNuGetAnalyzerStatus(context.SyntaxTree) == ProjectAnalyzerStatus.NoAnalyzer, "Not expecting to be called when project contains any SonarAnalyzer NuGet"); if (this.suppressionHandler.ShouldIssueBeReported(context.SyntaxTree, context.Diagnostic)) { context.ReportDiagnostic(context.Diagnostic); } }
internal /* for testing purposes */ void VsixAnalyzerReportDiagnostic(IReportingContext context) { Debug.Assert(context.SyntaxTree != null, "Not expecting to be called with a null SyntaxTree"); Debug.Assert(context.Diagnostic != null, "Not expecting to be called with a null Diagnostic"); Debug.Assert(GetProjectNuGetAnalyzerStatus(context.SyntaxTree) == ProjectAnalyzerStatus.NoAnalyzer, "Not expecting to be called when project contains any SonarAnalyzer NuGet"); // A DiagnosticAnalyzer can have multiple supported diagnostics and we decided to run the rule as long as at least // one of the diagnostics is enabled. Therefore we need to filter the reported issues. if (context.Diagnostic.Descriptor.CustomTags.Contains(DiagnosticTagsHelper.SonarWayTag)) { context.ReportDiagnostic(context.Diagnostic); } }
internal /* for testing purposes */ void VsixAnalyzerReportDiagnostic(IReportingContext context) { Debug.Assert(context.SyntaxTree != null, "Not expecting to be called with a null SyntaxTree"); Debug.Assert(context.Diagnostic != null, "Not expecting to be called with a null Diagnostic"); Debug.Assert(GetProjectNuGetAnalyzerStatus(context.SyntaxTree) == ProjectAnalyzerStatus.NoAnalyzer, "Not expecting to be called when project contains any SonarAnalyzer NuGet"); // A DiagnosticAnalyzer can have multiple supported diagnostics and we decided to run the rule as long as at least // one of the diagnostics is enabled. Therefore we need to filter the reported issues. if (ShouldRegisterContextActionWithFallback(new[] { context.Diagnostic.Descriptor }) && this.suppressionHandler.ShouldIssueBeReported(context.SyntaxTree, context.Diagnostic)) { context.ReportDiagnostic(context.Diagnostic); // TODO: Update the diagnostic based on configuration } }
public void Report(IReportingContext context) { this.contextInterceptor(context); }
public void Report(IReportingContext context) { this.context = context; }
/// <inheritdoc /> public void Report(IReportingContext context) { }
/// <inheritdoc /> public void Report(IReportingContext context) { this.decoratedReporter.Report(context); File.WriteAllText(Path.Combine(Directory.GetCurrentDirectory(), "CustomizationReport.txt"), this.decoratedReporter.ToString()); }
public ReportingAdditionalInfoPage(IReportingContext context) { _context = context; }
public IReportingPage[] GetPages(IReportingContext context) { return(new IReportingPage[] { new ReportingMppsDocumentationComponent(context) }); }
public IReportingPage[] GetPages(IReportingContext context) { return(new IReportingPage[] { new ReportingAdditionalInfoPage(context) }); }
/// <inheritdoc /> public void Report(IReportingContext context) { this.decoratedReporter.Report(context); File.WriteAllText(Path.Combine(Directory.GetCurrentDirectory(), "CustomizationReport.txt"), this.decoratedReporter.ToString()); }
public ReportingMppsDocumentationComponent(IReportingContext context) { _reportingContext = context; }
public void Report(IReportingContext context) { this.context = context; }