コード例 #1
0
 //------------------------------------------------------------------------------
 public SettingInfo(String settingName, DynamicSettingInfo dynamicSettingInfo)
 {
     this.SettingName         = settingName;
     this.SettingValue        = dynamicSettingInfo.SettingValue;
     this.SettingValueType    = dynamicSettingInfo.SettingType;
     this.SettingDefaultValue = null;
 }
コード例 #2
0
        //------------------------------------------------------------------------------
        public virtual void SetSetting <T>(string settingName, T settingValue)
        {
            lock (m_lockObject)
            {
                var fullSettingName = CorrectDynamicSettingName(settingName);

                var settingType = typeof(T);
                var settingInfo = new DynamicSettingInfo(settingValue, settingType);

                if (m_dynamicSettings.Contains(fullSettingName))
                {
                    m_dynamicSettings[fullSettingName] = settingInfo;
                }
                else
                {
                    m_dynamicSettings.Add(fullSettingName, settingInfo);
                }
            }
        }
コード例 #3
0
        //------------------------------------------------------------------------------
        public void Add(string fullSettingName, DynamicSettingInfo dynamicSettingInfo)
        {
            if (m_dynamicSettings.ContainsKey(fullSettingName))
            {
                Debug.Assert(m_dynamicSettingsOrder.Contains(fullSettingName));

                m_dynamicSettings[fullSettingName] = dynamicSettingInfo;
            }
            else
            {
                Debug.Assert(!m_dynamicSettingsOrder.Contains(fullSettingName));

                m_dynamicSettings.Add(fullSettingName, dynamicSettingInfo);
                m_dynamicSettingsOrder.Add(fullSettingName);
            }

            if (m_dynamicSettingsCustomOrder != null)
            {
                m_dynamicSettingsCustomOrder.Add(fullSettingName);
            }
        }
コード例 #4
0
 //------------------------------------------------------------------------------
 public bool TryGetValue(string fullSettingName, out DynamicSettingInfo value)
 {
     return(m_dynamicSettings.TryGetValue(fullSettingName, out value));
 }