refactor namespaces and imports (#670)
* re-namespace * optimize usings * more usings * more of the same * more implicit/global usings * cleanup all usings * minor fixes
This commit is contained in:
@@ -1,27 +1,23 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
using ErsatzTV.Core.FFmpeg;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
|
||||
namespace ErsatzTV.Formatters
|
||||
namespace ErsatzTV.Formatters;
|
||||
|
||||
public class ConcatPlaylistOutputFormatter : TextOutputFormatter
|
||||
{
|
||||
public class ConcatPlaylistOutputFormatter : TextOutputFormatter
|
||||
public ConcatPlaylistOutputFormatter()
|
||||
{
|
||||
public ConcatPlaylistOutputFormatter()
|
||||
{
|
||||
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/plain"));
|
||||
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("text/plain"));
|
||||
|
||||
SupportedEncodings.Add(Encoding.UTF8);
|
||||
SupportedEncodings.Add(Encoding.Unicode);
|
||||
}
|
||||
|
||||
protected override bool CanWriteType(Type type) => typeof(ConcatPlaylist).IsAssignableFrom(type);
|
||||
|
||||
public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) =>
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
context.HttpContext.Response.WriteAsync(((ConcatPlaylist) context.Object).ToString());
|
||||
SupportedEncodings.Add(Encoding.UTF8);
|
||||
SupportedEncodings.Add(Encoding.Unicode);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool CanWriteType(Type type) => typeof(ConcatPlaylist).IsAssignableFrom(type);
|
||||
|
||||
public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) =>
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
context.HttpContext.Response.WriteAsync(((ConcatPlaylist) context.Object).ToString());
|
||||
}
|
||||
Reference in New Issue
Block a user