示例#1
0
 /// <summary>
 /// Creates a new instance of the <see cref="ReadonlyContextualLoggableGeneratorDiagnosticReceiver{T}"/> class that accepts only <see cref="AdditionalFileAnalysisContext"/>.
 /// </summary>
 /// <param name="generator">Target <see cref="LoggableSourceGenerator"/>.</param>
 /// <param name="diagnosticReceiver">Target <see cref="ReadonlyContextualDiagnosticReceiver{T}"/>.</param>
 public static ReadonlyContextualLoggableGeneratorDiagnosticReceiver <AdditionalFileAnalysisContext> AdditionalFile(LoggableSourceGenerator generator, ReadonlyContextualDiagnosticReceiver <AdditionalFileAnalysisContext> diagnosticReceiver)
 {
     return(new ReadonlyContextualLoggableGeneratorDiagnosticReceiver <AdditionalFileAnalysisContext>(generator, diagnosticReceiver));
 }
示例#2
0
 /// <summary>
 /// Creates a new instance of the <see cref="ReadonlyContextualLoggableGeneratorDiagnosticReceiver{T}"/> class that accepts only <see cref="GeneratorExecutionContext"/>.
 /// </summary>
 /// <param name="generator">Target <see cref="LoggableSourceGenerator"/>.</param>
 /// <param name="diagnosticReceiver">Target <see cref="ReadonlyContextualDiagnosticReceiver{T}"/>.</param>
 public static ReadonlyContextualLoggableGeneratorDiagnosticReceiver <GeneratorExecutionContext> SourceGenerator(LoggableSourceGenerator generator, ReadonlyContextualDiagnosticReceiver <GeneratorExecutionContext> diagnosticReceiver)
 {
     return(new ReadonlyContextualLoggableGeneratorDiagnosticReceiver <GeneratorExecutionContext>(generator, diagnosticReceiver));
 }