kestrel init

This commit is contained in:
Claus Vium
2019-02-25 23:34:32 +01:00
parent 33b67a357f
commit 852460b991
14 changed files with 2242 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ using System.Collections.Specialized;
using System.Linq;
using System.Net;
using MediaBrowser.Model.Dto;
using Microsoft.AspNetCore.Http;
namespace MediaBrowser.Model.Services
{
@@ -23,6 +24,14 @@ namespace MediaBrowser.Model.Services
}
}
public QueryParamCollection(Microsoft.AspNetCore.Http.IHeaderDictionary headers)
{
foreach (var pair in headers)
{
Add(pair.Key, pair.Value);
}
}
// TODO remove this shit
public QueryParamCollection(WebHeaderCollection webHeaderCollection)
{
@@ -47,6 +56,14 @@ namespace MediaBrowser.Model.Services
}
}
public QueryParamCollection(IQueryCollection queryCollection)
{
foreach (var pair in queryCollection)
{
Add(pair.Key, pair.Value);
}
}
private static StringComparison GetStringComparison()
{
return StringComparison.OrdinalIgnoreCase;