public RoslynImplementationFactory(Compilation compilation)
        {
            this.compilation = compilation;
            this.symbolsDiagnosticReporter = new DiagnosticReporter();
            this.wellKnownSymbols          = new WellKnownSymbols(compilation, this.symbolsDiagnosticReporter);
            this.attributeInstantiator     = new AttributeInstantiator(this.wellKnownSymbols);
            this.emitter = new Emitter(this.wellKnownSymbols);

            // Catch any symbols errors from just instantiating WellKnownSymbols
            this.symbolsDiagnostics.UnionWith(this.symbolsDiagnosticReporter.Diagnostics);
        }
Ejemplo n.º 2
0
 public RoslynTypeAnalyzer(
     Compilation compilation,
     INamedTypeSymbol namedTypeSymbol,
     WellKnownSymbols wellKnownSymbols,
     AttributeInstantiator attributeInstantiator,
     DiagnosticReporter diagnosticReporter)
 {
     this.compilation           = compilation;
     this.namedTypeSymbol       = namedTypeSymbol;
     this.wellKnownSymbols      = wellKnownSymbols;
     this.attributeInstantiator = attributeInstantiator;
     this.diagnosticReporter    = diagnosticReporter;
 }