diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-07-18 16:54:23 +0100 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-07-18 16:54:23 +0100 |
| commit | f9b0816b80793965ef044f6871a7ffd80e91d303 (patch) | |
| tree | 0806a296b6c1e903eef40ad5b940eb7d278751f1 /Emby.Server.Implementations | |
| parent | 0f696104aca3309145b2e7f4169c4cf1be8ad81a (diff) | |
Changes a suggested.
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/Services/HttpContextExtension.cs | 33 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Services/ServiceHandler.cs | 1 |
2 files changed, 1 insertions, 33 deletions
diff --git a/Emby.Server.Implementations/Services/HttpContextExtension.cs b/Emby.Server.Implementations/Services/HttpContextExtension.cs deleted file mode 100644 index 6d3a600ab..000000000 --- a/Emby.Server.Implementations/Services/HttpContextExtension.cs +++ /dev/null @@ -1,33 +0,0 @@ -using MediaBrowser.Model.Services; -using Microsoft.AspNetCore.Http; - -namespace Emby.Server.Implementations.Services -{ - /// <summary> - /// Extention to enable the service stack request to be stored in the HttpRequest object. - /// </summary> - public static class HttpContextExtension - { - private const string SERVICESTACKREQUEST = "ServiceRequestStack"; - - /// <summary> - /// Set the service stack request. - /// </summary> - /// <param name="httpContext">The HttpContext instance.</param> - /// <param name="request">The IRequest instance.</param> - public static void SetServiceStackRequest(this HttpContext httpContext, IRequest request) - { - httpContext.Items[SERVICESTACKREQUEST] = request; - } - - /// <summary> - /// Get the service stack request. - /// </summary> - /// <param name="httpContext">The HttpContext instance.</param> - /// <returns>The service stack request instance.</returns> - public static IRequest GetServiceStack(this HttpContext httpContext) - { - return (IRequest)httpContext.Items[SERVICESTACKREQUEST]; - } - } -} diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs index 3997a5ddb..3d4e1ca77 100644 --- a/Emby.Server.Implementations/Services/ServiceHandler.cs +++ b/Emby.Server.Implementations/Services/ServiceHandler.cs @@ -6,6 +6,7 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; using Emby.Server.Implementations.HttpServer; +using MediaBrowser.Common.Extensions; using MediaBrowser.Model.Services; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; |
