/// <summary> /// Writes the ini data to a stream. /// </summary> /// <param name="writer">A write stream where the ini data will be stored</param> /// <param name="iniData">An <see cref="IniData"/> instance.</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="writer"/> is <c>null</c>. /// </exception> public void WriteData(StreamWriter writer, IniData iniData) { if (writer == null) { throw new ArgumentNullException("reader"); } writer.Write(iniData.ToString()); }
public void WriteData(StreamWriter writer, IniData iniData, IIniDataFormatter formatter) { if (formatter == null) { throw new ArgumentNullException(nameof(formatter)); } if (iniData == null) { throw new ArgumentNullException(nameof(iniData)); } if (writer == null) { throw new ArgumentNullException(nameof(writer)); } writer.Write(iniData.ToString(formatter)); }
/// <summary> /// Creates a string from the INI data. /// </summary> /// <param name="iniData">An <see cref="IniData"/> instance.</param> /// <returns> /// A formatted string with the contents of the /// <see cref="IniData"/> instance object. /// </returns> public string WriteString(IniData iniData) { return(iniData.ToString()); }
/// <summary> /// Creates a string from the INI data. /// </summary> /// <param name="iniData">An <see cref="IniData" instance.</param> /// <returns> /// A formatted string with the contents of the /// <see cref="IniData" instance object. /// </returns> public string WriteString(IniData iniData) => iniData.ToString();