Ejemplo n.º 1
0
        internal void RemoveProperty(string propertyName)
        {
            if (ConfigValues.ContainsKey(propertyName) == true)
            {
                //remove Property to ConfigValues
                ConfigValues.Remove(propertyName);

                //update also definition just for consistency
                if (m_configWrapperDefinition != null)
                {
                    m_configWrapperDefinition.RemoveProperty(propertyName);
                }
            }
        }
Ejemplo n.º 2
0
 internal void Merge(string idPrefix, ConfigWrapper configWrapper)
 {
     foreach (KeyValuePair <string, ConfigPropertyObject> pair in configWrapper.m_configValues)
     {
         string extendedParameterName = String.Format("{0}:{1}", idPrefix, pair.Key);
         if (ConfigValues.ContainsKey(extendedParameterName) == false)
         {
             var configValue = pair.Value;
             var property    = new ConfigPropertyObject(extendedParameterName, configValue.Value, configValue.Type, configValue.AssemblyQualifiedName, configValue.IsEnum, configValue.DisplayName, configValue.Description);
             ConfigValues.Add(extendedParameterName, property);
             property.PropertyChanged += property_PropertyChanged;
         }
     }
 }
Ejemplo n.º 3
0
        internal void AddProperty(ConfigPropertyObject propertyObject)
        {
            if (ConfigValues.ContainsKey(propertyObject.Name) == false)
            {
                //add Property to ConfigValues
                ConfigValues.Add(propertyObject.Name, propertyObject);

                //update also definition just for consistency
                if (m_configWrapperDefinition != null)
                {
                    m_configWrapperDefinition.AddProperty(propertyObject);
                }
            }
        }