// // Copyright (c) PlaceholderCompany. All rights reserved. // #pragma warning disable SA1309 // Variables should not begin with underscore namespace Jellyfin.Extensions { using System; using System.IO; /// /// A custom StreamWriter which supports setting a IFormatProvider. /// public class FormattingStreamWriter : StreamWriter { private readonly IFormatProvider _formatProvider; /// /// Initializes a new instance of the class. /// /// The stream to write to. /// The format provider to use. public FormattingStreamWriter(Stream stream, IFormatProvider formatProvider) : base(stream) { this._formatProvider = formatProvider; } /// /// Initializes a new instance of the class. /// /// The complete file path to write to. /// The format provider to use. public FormattingStreamWriter(string path, IFormatProvider formatProvider) : base(path) { this._formatProvider = formatProvider; } /// public override IFormatProvider FormatProvider => this._formatProvider; } }