コード例 #1
0
 // Constructor used by IniReader.
 internal IniSection(IniFile parentFile, string name, IniComment trailingComment)
     : base(parentFile, name, trailingComment)
 {
     this.keys = new IniKeyCollection(parentFile, this, parentFile.options.KeyDuplicate, parentFile.options.KeyNameCaseSensitive);
 }
コード例 #2
0
 public IniSection(IniFile parentFile, string name, IEnumerable <KeyValuePair <string, string> > nameValuePairs)
     : this(parentFile, name, GetIniKeysFromKeyValuePairs(parentFile, nameValuePairs))
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IniSection"/> class.
 /// </summary>
 /// <param name="parentFile">The owner file.</param>
 /// <param name="name">The section's name.</param>
 public IniSection(IniFile parentFile, string name) : this(parentFile, name, (IEnumerable <IniKey>)null)
 {
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IniSection"/> class.
 /// </summary>
 /// <param name="parentFile">The owner file.</param>
 /// <param name="name">The section's name.</param>
 /// <param name="keys">The section's keys.</param>
 public IniSection(IniFile parentFile, string name, params IniKey[] keys) : this(parentFile, name, (IEnumerable <IniKey>)keys)
 {
 }
コード例 #5
0
 /// <summary>
 /// Copies this <see cref="IniSection"/> instance and sets copied instance's <see cref="IniItem.ParentFile">ParentFile</see>.
 /// </summary>
 /// <param name="destinationFile">Copied section's parent file.</param>
 /// <returns>Copied <see cref="IniSection"/> that belongs to a specified <see cref="IniFile"/>.</returns>
 /// <seealso href="c49dc3a5-866f-4d2d-8f89-db303aceb5fe.htm#copying" target="_self">IniItem's Copying</seealso>
 public IniSection Copy(IniFile destinationFile)
 {
     return(new IniSection(destinationFile, this));
 }