Exemple #1
0
 public Runner(ISolutionReader solutionReader, IProjectReader projectReader, IDependencyDepthAnalyser dependencyDepthAnalyser, IEnumerable <IGraphRenderer> renderers)
 {
     _solutionReader          = solutionReader;
     _projectReader           = projectReader;
     _dependencyDepthAnalyser = dependencyDepthAnalyser;
     _renderers = renderers;
 }
Exemple #2
0
        public SolutionBuilder(ISolutionFiles files, IProjectReader project)
        {
            _files   = files;
            _project = project;

            _fileSystem = new FileSystem();
        }
Exemple #3
0
        public SolutionBuilder(ISolutionFiles files, IProjectReader project)
        {
            _files = files;
            _project = project;

            _fileSystem = new FileSystem();
        }
Exemple #4
0
 internal ProjectTreeLoader(IFileSystemAccess fileSystem, IProjectReader projectReader, IProjectWriter projectWriter, IPathCalculator path, IActionLog log)
 {
     _path          = path;
     _fileSystem    = fileSystem;
     _projectReader = projectReader;
     _projectWriter = projectWriter;
     _log           = log;
 }
 public SetupController(
     ISetupService setupService,
     EngineSettings engineSettings,
     IProjectReader projectReader)
 {
     _setupService   = setupService;
     _engineSettings = engineSettings;
     _projectReader  = projectReader;
 }
Exemple #6
0
 public FeatureUpdater(
     IProjectReader projectReader,
     IProjectExecutor projectExecutor,
     IHostingEnvironment hostingEnvironment)
 {
     _projectReader      = projectReader;
     _projectExecutor    = projectExecutor;
     _hostingEnvironment = hostingEnvironment;
 }
Exemple #7
0
        public Project(VerifiedFile csProjFile, IProjectReader projectReader)
        {
            _csProjFile = csProjFile;
            _xml        = new DotNetXMLDoc(csProjFile);

            DotNetVersion     = projectReader.ExtractDotNetVersion(_xml);
            ProjectReferences = projectReader.ExtractProjectReferences(_xml).ToArray();
            FileReferences    = projectReader.ExtractFileReferences(_xml).ToArray();
            AssemblyName      = projectReader.ExtractAssemblyName(_xml);
        }
Exemple #8
0
 public ApplicationProjectHarvester(
     IPluginManager pluginManager,
     IHostingEnvironment hostingEnvironment,
     IOptions <ProjectHarvestingOptions> projectOptions,
     IProjectReader projectReader)
 {
     _pluginManager      = pluginManager;
     _hostingEnvironment = hostingEnvironment;
     _projectOptions     = projectOptions;
     _projectReader      = projectReader;
 }
Exemple #9
0
        public ProjectReaderNugetDependencyDecorator(IProjectReader @base,
                                                     PackageMetadataResource metadataProvider,
                                                     DependencyInfoResource dependencyResolver,
                                                     SourceCacheContext cacheContext,
                                                     ILogger logger)
        {
            _base               = @base ?? throw new ArgumentNullException(nameof(@base));
            _metadataProvider   = metadataProvider ?? throw new ArgumentNullException(nameof(metadataProvider));
            _dependencyResolver = dependencyResolver ?? throw new ArgumentNullException(nameof(dependencyResolver));
            _cacheContext       = cacheContext ?? throw new ArgumentNullException(nameof(cacheContext));
            _logger             = logger ?? throw new ArgumentNullException(nameof(logger));

            _cancellationToken = CancellationToken.None;
        }
        object ReadProjectFile(FilePath fileName, IProgressMonitor monitor)
        {
            XmlTextReader reader = null;

            try
            {
                reader = new XmlTextReader(new StreamReader(fileName));
                reader.MoveToContent();

                string version = reader.GetAttribute("version");
                if (version == null)
                {
                    version = reader.GetAttribute("fileversion");
                }

                DataSerializer serializer    = new DataSerializer(MD1ProjectService.DataContext, fileName);
                IProjectReader projectReader = null;

                monitor.BeginTask(GettextCatalog.GetString("Loading project: {0}", fileName), 1);

                if (version == "2.0" || version == "2.1")
                {
                    projectReader = new ProjectReaderV2(serializer);
                    return(projectReader.ReadProject(reader));
                }
                else
                {
                    throw new MD1UnknownProjectVersion(fileName, version);
                }
            }
            catch (Exception ex)
            {
                monitor.ReportError(GettextCatalog.GetString("Could not load project: {0}", fileName), ex);
                throw;
            }
            finally
            {
                monitor.EndTask();
                if (reader != null)
                {
                    reader.Close();
                }
            }
        }
        public void SetUp()
        {
            theSolutionFiles = new StubSolutionFiles();
            theSolutionFiles.TheSolutionIs(new Solution {
                SourceFolder = "src", Directory = "."
            });
            theSolutionFiles.AddProject("Project1.csproj");
            theSolutionFiles.AddProject("Project2.csproj");

            p1 = new Project("Project1.csproj");
            p2 = new Project("Project2.csproj");

            theProjectReader = MockRepository.GenerateStub <IProjectReader>();
            theProjectReader.Stub(x => x.Read("Project1.csproj")).Return(p1);
            theProjectReader.Stub(x => x.Read("Project2.csproj")).Return(p2);

            theSolutionBuilder = new SolutionBuilder(theSolutionFiles, theProjectReader);
            theSolution        = theSolutionBuilder.Build();
        }
Exemple #12
0
 public DotnetTestRunnerResolverFactory(IProjectReader projectReader)
 {
     _projectReader = projectReader;
 }
 public ProjectGraphBuilder(IProjectReader projectReader, INugetReferenceReader nugetReferenceReader)
 {
     _projectReader        = projectReader;
     _nugetReferenceReader = nugetReferenceReader;
 }
Exemple #14
0
 public SolutionReader(IProjectReader projectReader)
 {
     _projectReader = projectReader;
 }
 public ProjectDocumentFactory(IProjectReader projectReader)
 {
     _projectReader = projectReader;
 }
Exemple #16
0
 public DependencyProcessor(IProjectReader projectReader, IProjectWriter projectWriter)
 {
     _projectReader = projectReader ?? throw new ArgumentNullException(nameof(projectReader));
     _projectWriter = projectWriter ?? throw new ArgumentNullException(nameof(projectWriter));
 }
Exemple #17
0
 public ProjectDocumentFactory(IProjectReader projectReader)
 {
     _projectReader = projectReader;
 }
 public ProjectLoader(IProjectReader reader)
 {
     _reader = reader;
 }
 public ProjectLoader(IProjectReader reader)
 {
     _reader = reader;
 }