2020-01-22 20:00:07 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
#pragma warning disable SA1600
|
|
|
|
|
2019-01-13 19:54:44 +00:00
|
|
|
using System;
|
2016-11-04 08:31:05 +00:00
|
|
|
using System.IO;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
namespace Emby.Dlna.Didl
|
|
|
|
{
|
|
|
|
public class StringWriterWithEncoding : StringWriter
|
|
|
|
{
|
|
|
|
private readonly Encoding _encoding;
|
|
|
|
|
|
|
|
public StringWriterWithEncoding()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(IFormatProvider formatProvider)
|
|
|
|
: base(formatProvider)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(StringBuilder sb)
|
|
|
|
: base(sb)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(StringBuilder sb, IFormatProvider formatProvider)
|
|
|
|
: base(sb, formatProvider)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(Encoding encoding)
|
|
|
|
{
|
|
|
|
_encoding = encoding;
|
|
|
|
}
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(IFormatProvider formatProvider, Encoding encoding)
|
|
|
|
: base(formatProvider)
|
|
|
|
{
|
|
|
|
_encoding = encoding;
|
|
|
|
}
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(StringBuilder sb, Encoding encoding)
|
|
|
|
: base(sb)
|
|
|
|
{
|
|
|
|
_encoding = encoding;
|
|
|
|
}
|
|
|
|
|
|
|
|
public StringWriterWithEncoding(StringBuilder sb, IFormatProvider formatProvider, Encoding encoding)
|
|
|
|
: base(sb, formatProvider)
|
|
|
|
{
|
|
|
|
_encoding = encoding;
|
|
|
|
}
|
|
|
|
|
2019-01-13 20:31:14 +00:00
|
|
|
public override Encoding Encoding => (null == _encoding) ? base.Encoding : _encoding;
|
2016-11-04 08:31:05 +00:00
|
|
|
}
|
|
|
|
}
|