Exemplo n.º 1
0
 public Worker(
     Workspace workspace,
     DiagnosticReporter diagnosticReporter,
     PathResolver pathResolver,
     ProjectFileLoaderRegistry projectFileLoaderRegistry,
     ProjectBuildManager buildManager,
     ImmutableArray <string> requestedProjectPaths,
     string baseDirectory,
     ImmutableDictionary <string, string> globalProperties,
     ProjectMap projectMap,
     IProgress <ProjectLoadProgress> progress,
     DiagnosticReportingOptions requestedProjectOptions,
     DiagnosticReportingOptions discoveredProjectOptions,
     bool preferMetadataForReferencesOfDiscoveredProjects)
 {
     _workspace                 = workspace;
     _diagnosticReporter        = diagnosticReporter;
     _pathResolver              = pathResolver;
     _projectFileLoaderRegistry = projectFileLoaderRegistry;
     _buildManager              = buildManager;
     _baseDirectory             = baseDirectory;
     _requestedProjectPaths     = requestedProjectPaths;
     _globalProperties          = globalProperties;
     _projectMap                = projectMap ?? ProjectMap.Create();
     _progress = progress;
     _requestedProjectOptions  = requestedProjectOptions;
     _discoveredProjectOptions = discoveredProjectOptions;
     _preferMetadataForReferencesOfDiscoveredProjects = preferMetadataForReferencesOfDiscoveredProjects;
     _projectIdToFileInfoMap          = new Dictionary <ProjectId, ProjectFileInfo>();
     _pathToDiscoveredProjectInfosMap = new Dictionary <string, ImmutableArray <ProjectInfo> >(PathUtilities.Comparer);
     _projectIdToProjectReferencesMap = new Dictionary <ProjectId, List <ProjectReference> >();
 }
Exemplo n.º 2
0
        private ErgonWorkspace(
            HostServices hostServices,
            ImmutableDictionary <string, string> properties)
            : base(hostServices, WorkspaceKind.MSBuild)
        {
            var diagnosticReporter = new DiagnosticReporter(this);

            _projectFileLoaderRegistry = new ProjectFileLoaderRegistry(this, diagnosticReporter);
            _loader = new ErgonProjectLoader(this, diagnosticReporter, _projectFileLoaderRegistry, properties);
        }
Exemplo n.º 3
0
        internal ErgonProjectLoader(
            Workspace workspace,
            DiagnosticReporter diagnosticReporter,
            ProjectFileLoaderRegistry projectFileLoaderRegistry,
            ImmutableDictionary <string, string> properties)
        {
            _workspace                 = workspace;
            _diagnosticReporter        = diagnosticReporter ?? new DiagnosticReporter(workspace);
            _pathResolver              = new PathResolver(_diagnosticReporter);
            _projectFileLoaderRegistry = projectFileLoaderRegistry ?? new ProjectFileLoaderRegistry(workspace, _diagnosticReporter);

            _properties = ImmutableDictionary.Create <string, string>(StringComparer.OrdinalIgnoreCase);

            if (properties != null)
            {
                _properties = _properties.AddRange(properties);
            }
        }
Exemplo n.º 4
0
 public PathResolver(DiagnosticReporter diagnosticReporter)
 {
     _diagnosticReporter = diagnosticReporter;
 }