Exemplo n.º 1
0
 public void InitializeStandalone(CSharpCompilation compilationIn, CommonOptions options)
 {
     compilation  = compilationIn;
     layout       = new Layout();
     extractor    = new Extraction.Extractor(true, null, Logger, PathTransformer);
     this.options = options;
     LogExtractorInfo(Extraction.Extractor.Version);
     SetReferencePaths();
 }
Exemplo n.º 2
0
        /// <summary>
        /// End initialization of the analyser.
        /// </summary>
        /// <param name="commandLineArguments">Arguments passed to csc.</param>
        /// <param name="options">Extractor options.</param>
        /// <param name="compilation">The Roslyn compilation.</param>
        /// <returns>A Boolean indicating whether to proceed with extraction.</returns>
        public void EndInitialize(
            CSharpCommandLineArguments commandLineArguments,
            Options options,
            CSharpCompilation compilation)
        {
            if (!init)
            {
                throw new InternalError("EndInitialize called without BeginInitialize returning true");
            }
            layout           = new Layout();
            this.options     = options;
            this.compilation = compilation;
            extractor        = new Extraction.Extractor(false, GetOutputName(compilation, commandLineArguments), Logger, PathTransformer);
            LogDiagnostics();

            SetReferencePaths();

            CompilationErrors += FilteredDiagnostics.Count();
        }
Exemplo n.º 3
0
 public Context(Extraction.Extractor e, Compilation c, TrapWriter trapWriter, IExtractionScope scope, bool addAssemblyTrapPrefix)
     : base(e, trapWriter, addAssemblyTrapPrefix)
 {
     Compilation = c;
     this.scope  = scope;
 }