diff options
Diffstat (limited to 'MediaBrowser.Api/Session')
| -rw-r--r-- | MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs | 16 | ||||
| -rw-r--r-- | MediaBrowser.Api/Session/SessionsService.cs | 20 |
2 files changed, 14 insertions, 22 deletions
diff --git a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs b/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs index 533e7d307..387ccad25 100644 --- a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs +++ b/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs @@ -1,13 +1,10 @@ -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Net; -using MediaBrowser.Controller.Session; -using Microsoft.Extensions.Logging; -using MediaBrowser.Model.Session; using System.Collections.Generic; -using System.Linq; using System.Threading; -using MediaBrowser.Model.Threading; using System.Threading.Tasks; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Net; +using MediaBrowser.Controller.Session; +using Microsoft.Extensions.Logging; namespace MediaBrowser.Api.Session { @@ -20,10 +17,7 @@ namespace MediaBrowser.Api.Session /// Gets the name. /// </summary> /// <value>The name.</value> - protected override string Name - { - get { return "Sessions"; } - } + protected override string Name => "Sessions"; /// <summary> /// The _kernel diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index 1056b3c8b..234ada6c0 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -1,17 +1,16 @@ -using MediaBrowser.Controller.Devices; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Net; -using MediaBrowser.Controller.Security; -using MediaBrowser.Controller.Session; -using MediaBrowser.Model.Session; using System; -using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Model.Services; using MediaBrowser.Controller; +using MediaBrowser.Controller.Devices; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Net; +using MediaBrowser.Controller.Security; +using MediaBrowser.Controller.Session; using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Services; +using MediaBrowser.Model.Session; namespace MediaBrowser.Api.Session { @@ -414,10 +413,9 @@ namespace MediaBrowser.Api.Session /// <param name="request">The request.</param> public Task Post(SendSystemCommand request) { - GeneralCommandType commandType; var name = request.Command; - if (Enum.TryParse(name, true, out commandType)) + if (Enum.TryParse(name, true, out GeneralCommandType commandType)) { name = commandType.ToString(); } @@ -519,4 +517,4 @@ namespace MediaBrowser.Api.Session _sessionManager.ReportCapabilities(request.Id, request); } } -}
\ No newline at end of file +} |
