aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorClaus Vium <clausvium@gmail.com>2019-02-25 23:34:32 +0100
committerClaus Vium <clausvium@gmail.com>2019-02-26 22:11:21 +0100
commit852460b99155e015ed5f1d7ad2fab0281bfdfbec (patch)
treebedbe59bfef06ce6acf8c774622545c0dc7549a4 /MediaBrowser.Model
parent33b67a357fe73103f046b822d7cc66fc5318a9ef (diff)
kestrel init
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj4
-rw-r--r--MediaBrowser.Model/Services/QueryParamCollection.cs17
2 files changed, 20 insertions, 1 deletions
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index f17fd7159d..2f1ea13d9b 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Authors>Jellyfin Contributors</Authors>
@@ -13,6 +13,8 @@
</PropertyGroup>
<ItemGroup>
+ <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
+ <PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
</ItemGroup>
diff --git a/MediaBrowser.Model/Services/QueryParamCollection.cs b/MediaBrowser.Model/Services/QueryParamCollection.cs
index 0e0ebf848b..09806ed9c2 100644
--- a/MediaBrowser.Model/Services/QueryParamCollection.cs
+++ b/MediaBrowser.Model/Services/QueryParamCollection.cs
@@ -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;