VsTeXProject.VisualStudio.Project.ProjectNode.GetMsBuildProperty C# (CSharp) Method

GetMsBuildProperty() private method

private GetMsBuildProperty ( string propertyName, bool resetCache ) : Microsoft.Build.Execution.ProjectPropertyInstance
propertyName string
resetCache bool
return Microsoft.Build.Execution.ProjectPropertyInstance
        private MSBuildExecution.ProjectPropertyInstance GetMsBuildProperty(string propertyName, bool resetCache)
        {
            if (resetCache || CurrentConfig == null)
            {
                // Get properties from project file and cache it
                SetCurrentConfiguration();
                CurrentConfig = buildProject.CreateProjectInstance();
            }

            if (CurrentConfig == null)
                throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture,
                    SR.GetString(SR.FailedToRetrieveProperties, CultureInfo.CurrentUICulture), propertyName));

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