/// <summary> /// Constructs the section with an optional name. /// </summary> /// <param name="name"> /// The name of the section. /// </param> public Section(string name = null) { m_name = Naming.IsValid(name) ? name : null; m_keys = new Dictionary <string, Key>(); }
/// <summary> /// Constructs the instance with an optional name and value. /// </summary> /// <remarks> /// <para> /// If the given name is invalid, <see cref="Name"/> will be set to /// <see cref="string.Empty"/> (See <see cref="Naming.IsValid(string)"/>). /// </para> /// <para> /// If the given value is null, <see cref="Value"/> will be set to /// <see cref="string.Empty"/>. /// </para> /// </remarks> /// <param name="name"> /// The name of the key. /// </param> /// <param name="value"> /// The value of the key. /// </param> public Key(string name = null, string value = null) { m_name = Naming.IsValid(name) ? name : string.Empty; Value = value ?? string.Empty; }