Updated code to correct build errors for Jellyfin.Extensions

This commit is contained in:
2026-02-20 11:24:16 -05:00
parent d5fdbec943
commit 44ab9e1d6d
70 changed files with 12677 additions and 420 deletions
@@ -2,41 +2,44 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
using System;
using System.IO;
#pragma warning disable SA1309 // Variables should not begin with underscore
namespace Jellyfin.Extensions;
/// <summary>
/// A custom StreamWriter which supports setting a IFormatProvider.
/// </summary>
public class FormattingStreamWriter : StreamWriter
namespace Jellyfin.Extensions
{
private readonly IFormatProvider _formatProvider;
using System;
using System.IO;
/// <summary>
/// Initializes a new instance of the <see cref="FormattingStreamWriter"/> class.
/// A custom StreamWriter which supports setting a IFormatProvider.
/// </summary>
/// <param name="stream">The stream to write to.</param>
/// <param name="formatProvider">The format provider to use.</param>
public FormattingStreamWriter(Stream stream, IFormatProvider formatProvider)
: base(stream)
public class FormattingStreamWriter : StreamWriter
{
_formatProvider = formatProvider;
}
private readonly IFormatProvider _formatProvider;
/// <summary>
/// Initializes a new instance of the <see cref="FormattingStreamWriter"/> class.
/// </summary>
/// <param name="path">The complete file path to write to.</param>
/// <param name="formatProvider">The format provider to use.</param>
public FormattingStreamWriter(string path, IFormatProvider formatProvider)
: base(path)
{
_formatProvider = formatProvider;
}
/// <summary>
/// Initializes a new instance of the <see cref="FormattingStreamWriter"/> class.
/// </summary>
/// <param name="stream">The stream to write to.</param>
/// <param name="formatProvider">The format provider to use.</param>
public FormattingStreamWriter(Stream stream, IFormatProvider formatProvider)
: base(stream)
{
this._formatProvider = formatProvider;
}
/// <inheritdoc />
public override IFormatProvider FormatProvider
=> _formatProvider;
/// <summary>
/// Initializes a new instance of the <see cref="FormattingStreamWriter"/> class.
/// </summary>
/// <param name="path">The complete file path to write to.</param>
/// <param name="formatProvider">The format provider to use.</param>
public FormattingStreamWriter(string path, IFormatProvider formatProvider)
: base(path)
{
this._formatProvider = formatProvider;
}
/// <inheritdoc />
public override IFormatProvider FormatProvider
=> this._formatProvider;
}
}