コード例 #1
0
        public void InitializeProject(BuildParameters buildParameters, Func <ProjectInstance> loadProjectFromFile)
        {
            if (_project == null ||            // building from file. Load project from file
                _transferredProperties != null // need to overwrite particular properties, so load project from file and overwrite properties
                )
            {
                Project = loadProjectFromFile.Invoke();
            }
            else if (_translateEntireProjectInstanceState)
            {
                // projectInstance was serialized over. Finish initialization with node specific state

                _project.LateInitialize(buildParameters.ProjectRootElementCache, buildParameters.HostServices);
            }

            ErrorUtilities.VerifyThrow(IsLoaded, $"This {nameof(BuildRequestConfiguration)} must be loaded at the end of this method");
        }