VsTeXProject.VisualStudio.Project.ProjectConfig.GetMsBuildProperty C# (CSharp) Метод

GetMsBuildProperty() приватный Метод

private GetMsBuildProperty ( string propertyName, bool resetCache ) : Microsoft.Build.Execution.ProjectPropertyInstance
propertyName string
resetCache bool
Результат Microsoft.Build.Execution.ProjectPropertyInstance
        private MSBuildExecution.ProjectPropertyInstance GetMsBuildProperty(string propertyName, bool resetCache)
        {
            if (resetCache || currentConfig == null)
            {
                // Get properties for current configuration from project file and cache it
                ProjectMgr.SetConfiguration(ConfigName);
                ProjectMgr.BuildProject.ReevaluateIfNecessary();
                // Create a snapshot of the evaluated project in its current state
                currentConfig = ProjectMgr.BuildProject.CreateProjectInstance();

                // Restore configuration
                ProjectMgr.SetCurrentConfiguration();
            }

            if (currentConfig == null)
                throw new Exception("Failed to retrieve properties");

            // return property asked for
            return currentConfig.GetProperty(propertyName);
        }