/// <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>
        /// <param name="formatter">Formaterr instance that controls how the ini data is transformed to a string</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="writer"/> is <c>null</c>.
        /// </exception>
        public void WriteData(StreamWriter writer, IniData iniData, IIniDataFormatter formatter)
        {
            if (formatter == null)
                throw new ArgumentNullException("formatter");
            if (iniData == null)
                throw new ArgumentNullException("iniData");
            if (writer == null)
                throw new ArgumentNullException("writer");

            writer.Write(iniData.ToString(formatter));
        }
 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));
 }
Esempio n. 3
0
 public virtual string ToString(IIniDataFormatter formatter)
 {
     return(formatter.IniDataToString(this));
 }
Esempio n. 4
0
 public virtual string ToString(IIniDataFormatter formatter)
 {
     return formatter.IniDataToString(this);
 }
Esempio n. 5
0
 public virtual string ToString(IIniDataFormatter formatter) => formatter.IniDataToString(this);