Esempio n. 1
0
        public MSBuildProject(
            MSBuildWorkspaceUpgradeContext context,
            IEnumerable <IComponentIdentifier> componentIdentifiers,
            Factories factories,
            FileInfo file,
            ILogger <MSBuildProject> logger)
        {
            FileInfo = file ?? throw new ArgumentNullException(nameof(file));
            Context  = context ?? throw new ArgumentNullException(nameof(context));

            _factories            = factories ?? throw new ArgumentNullException(nameof(factories));
            _componentIdentifiers = componentIdentifiers ?? throw new ArgumentNullException(nameof(componentIdentifiers));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
Esempio n. 2
0
        public MSBuildProject(
            MSBuildWorkspaceUpgradeContext context,
            IEnumerable <IComponentIdentifier> componentIdentifiers,
            Factories factories,
            IPackageRestorer restorer,
            ITargetFrameworkMonikerComparer comparer,
            FileInfo file,
            ILogger logger)
        {
            FileInfo = file ?? throw new ArgumentNullException(nameof(file));
            Context  = context ?? throw new ArgumentNullException(nameof(context));

            _factories            = factories ?? throw new ArgumentNullException(nameof(factories));
            _componentIdentifiers = componentIdentifiers ?? throw new ArgumentNullException(nameof(componentIdentifiers));
            _restorer             = restorer ?? throw new ArgumentNullException(nameof(restorer));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
Esempio n. 3
0
        public MSBuildWorkspaceUpgradeContext(
            IOptions <WorkspaceOptions> options,
            Factories factories,
            Func <MSBuildWorkspaceUpgradeContext, FileInfo, MSBuildProject> projectFactory,
            ILogger <MSBuildWorkspaceUpgradeContext> logger)
        {
            _projectFactory = projectFactory ?? throw new ArgumentNullException(nameof(projectFactory));
            _options        = options ?? throw new ArgumentNullException(nameof(options));
            _logger         = logger ?? throw new ArgumentNullException(nameof(logger));

            _projectCache = new Dictionary <string, IProject>(StringComparer.OrdinalIgnoreCase);

            Properties        = new UpgradeContextProperties();
            SolutionInfo      = factories.CreateSolutionInfo(InputPath);
            GlobalProperties  = CreateProperties(options.Value);
            ProjectCollection = new ProjectCollection(globalProperties: GlobalProperties);
        }
Esempio n. 4
0
        public MSBuildWorkspaceUpgradeContext(
            IOptions <WorkspaceOptions> options,
            IPackageRestorer restorer,
            Factories factories,
            ITargetFrameworkMonikerComparer comparer,
            IEnumerable <IComponentIdentifier> componentIdentifiers,
            ILogger <MSBuildWorkspaceUpgradeContext> logger)
        {
            _factories            = factories ?? throw new ArgumentNullException(nameof(factories));
            _projectCache         = new Dictionary <string, IProject>(StringComparer.OrdinalIgnoreCase);
            _options              = options ?? throw new ArgumentNullException(nameof(options));
            _restorer             = restorer ?? throw new ArgumentNullException(nameof(restorer));
            _comparer             = comparer ?? throw new ArgumentNullException(nameof(comparer));
            _componentIdentifiers = componentIdentifiers ?? throw new ArgumentNullException(nameof(componentIdentifiers));
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));

            Properties        = new UpgradeContextProperties();
            SolutionInfo      = factories.CreateSolutionInfo(InputPath);
            GlobalProperties  = CreateProperties(options.Value);
            ProjectCollection = new ProjectCollection(globalProperties: GlobalProperties);
        }