コード例 #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;
 }
コード例 #5
0
 /// <summary>
 /// Standard constructor
 /// </summary>
 /// <param name="pSection">Section</param>
 public ConfigurationFileSectionEventArgs(ConfigurationFileSection pSection)
 {
     this.Section = pSection;
 }