示例#1
0
 /// <summary>
 /// On property
 /// </summary>
 /// <param name="pProperty">Property</param>
 protected void OnProperty(ConfigurationFileProperty pProperty)
 {
     if (this.Property != null)
     {
         this.Property(this, new ConfigurationFilePropertyEventArgs(pProperty));
     }
 }
        /// <summary>
        /// Setting property
        /// </summary>
        /// <param name="pPropertyName">Property name</param>
        /// <param name="pPropertyValue">Property value</param>
        public void SetProperty(string pPropertyName, string pPropertyValue)
        {
            ConfigurationFileProperty lProperty = this.FindProperty(pPropertyName);

            if (lProperty != null)
            {
                lProperty.Value = pPropertyValue;
            }
            else
            {
                this.Properties.Add(new ConfigurationFileProperty(pPropertyName, pPropertyValue));
            }
        }
        /// <summary>
        /// Getting property
        /// </summary>
        /// <param name="pPropertyName">Property name</param>
        /// <returns>Property value</returns>
        public string GetProperty(string pPropertyName)
        {
            ConfigurationFileProperty lProperty = this.FindProperty(pPropertyName);

            if (lProperty != null)
            {
                return(lProperty.Value);
            }
            else
            {
                return(string.Empty);
            }
        }
示例#4
0
 /// <summary>
 /// Standard constructor
 /// </summary>
 /// <param name="pProperty">Property</param>
 public ConfigurationFilePropertyEventArgs(ConfigurationFileProperty pProperty)
 {
     this.Property = pProperty;
 }