示例#1
0
 /// <summary>
 /// On section
 /// </summary>
 /// <param name="pSection">Section</param>
 protected void OnSection(ConfigurationFileSection pSection)
 {
     if (this.Section != null)
     {
         this.Section(this, new ConfigurationFileSectionEventArgs(pSection));
     }
 }
示例#2
0
 /// <summary>
 /// Verifying section (if not found - creating one)
 /// </summary>
 protected void VerifySection()
 {
     if (this.CurrentSection == null)
     {
         this.CurrentSection = new ConfigurationFileSection();
         this.Sections.Add(this.CurrentSection);
     }
 }
示例#3
0
 /// <summary>
 /// Setting a section
 /// </summary>
 /// <param name="pSectionName">Section name</param>
 public void SetSection(string pSectionName)
 {
     this.CurrentSection = this.Sections.FirstOrDefault <ConfigurationFileSection>(pSection => pSection.Name == pSectionName);
     if (this.CurrentSection == null)
     {
         this.CurrentSection = new ConfigurationFileSection(pSectionName);
         this.Sections.Add(this.CurrentSection);
     }
 }
示例#4
0
 /// <summary>
 /// Standard constructor
 /// </summary>
 public ConfigurationFile()
 {
     this.Sections       = new List <ConfigurationFileSection>();
     this.CurrentSection = null;
 }
 /// <summary>
 /// Standard constructor
 /// </summary>
 /// <param name="pSection">Section</param>
 public ConfigurationFileSectionEventArgs(ConfigurationFileSection pSection)
 {
     this.Section = pSection;
 }