GetConfigurationProperty() public method

public GetConfigurationProperty ( string propertyName, bool resetCache ) : string
propertyName string
resetCache bool
return string
コード例 #1
0
ファイル: SettingsPage.cs プロジェクト: formist/LinkMe
        // relative to active configuration.
        public string GetConfigProperty(string propertyName)
        {
            if (this.ProjectMgr != null)
            {
                string unifiedResult  = null;
                bool   cacheNeedReset = true;

                for (int i = 0; i < this.projectConfigs.Length; i++)
                {
                    ProjectConfig config   = projectConfigs[i];
                    string        property = config.GetConfigurationProperty(propertyName, cacheNeedReset);
                    cacheNeedReset = false;

                    if (property != null)
                    {
                        string text = property.Trim();

                        if (i == 0)
                        {
                            unifiedResult = text;
                        }
                        else if (unifiedResult != text)
                        {
                            return("");                            // tristate value is blank then
                        }
                    }
                }

                return(unifiedResult);
            }

            return(String.Empty);
        }