/// <summary> /// Saves the configuration to a binary file, using a specific <see cref="BinaryWriter"/>. /// </summary> /// /// <param name="stream">The stream to save the configuration to.</param> /// <param name="writer">The writer to use. Specify null to use the default writer.</param> public void SaveToBinaryStream(Stream stream, BinaryWriter writer) { if (stream == null) { throw new ArgumentNullException("stream"); } ConfigurationWriter.WriteToStreamBinary(this, stream, writer); }
/// <summary> /// Saves the configuration to a stream. /// </summary> /// /// <param name="stream">The stream to save the configuration to.</param> /// <param name="encoding">The character encoding to use. Specify null to use the default encoding, which is UTF8.</param> public void SaveToStream(Stream stream, Encoding encoding) { if (stream == null) { throw new ArgumentNullException("stream"); } ConfigurationWriter.WriteToStreamTextual(this, stream, encoding); }