Make SonarCloud happy

pull/2162/head
Bond_009 5 years ago
parent 04f826e50c
commit 3623aafcb6

@ -93,7 +93,6 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services; using MediaBrowser.Model.Services;
using MediaBrowser.Model.System; using MediaBrowser.Model.System;
using MediaBrowser.Model.Tasks; using MediaBrowser.Model.Tasks;
using MediaBrowser.Model.Updates;
using MediaBrowser.Providers.Chapters; using MediaBrowser.Providers.Chapters;
using MediaBrowser.Providers.Manager; using MediaBrowser.Providers.Manager;
using MediaBrowser.Providers.Plugins.TheTvdb; using MediaBrowser.Providers.Plugins.TheTvdb;
@ -101,12 +100,10 @@ using MediaBrowser.Providers.Subtitles;
using MediaBrowser.WebDashboard.Api; using MediaBrowser.WebDashboard.Api;
using MediaBrowser.XbmcMetadata.Providers; using MediaBrowser.XbmcMetadata.Providers;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
using Prometheus.DotNetRuntime; using Prometheus.DotNetRuntime;
using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
namespace Emby.Server.Implementations namespace Emby.Server.Implementations
{ {

@ -28,12 +28,11 @@ using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Net.Http.Headers;
using ServiceStack.Text.Jsv; using ServiceStack.Text.Jsv;
namespace Emby.Server.Implementations.HttpServer namespace Emby.Server.Implementations.HttpServer
{ {
public class HttpListenerHost : IHttpServer, IDisposable public class HttpListenerHost : IHttpServer
{ {
/// <summary> /// <summary>
/// The key for a setting that specifies the default redirect path /// The key for a setting that specifies the default redirect path
@ -699,28 +698,6 @@ namespace Emby.Server.Implementations.HttpServer
return _baseUrlPrefix + NormalizeUrlPath(path); return _baseUrlPrefix + NormalizeUrlPath(path);
} }
/// <inheritdoc />
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (_disposed)
{
return;
}
if (disposing)
{
// TODO:
}
_disposed = true;
}
/// <summary> /// <summary>
/// Processes the web socket message received. /// Processes the web socket message received.
/// </summary> /// </summary>

@ -36,8 +36,6 @@ namespace Emby.Server.Implementations.HttpServer
/// </summary> /// </summary>
private readonly WebSocket _socket; private readonly WebSocket _socket;
private bool _disposed = false;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="WebSocketConnection" /> class. /// Initializes a new instance of the <see cref="WebSocketConnection" /> class.
/// </summary> /// </summary>
@ -221,12 +219,6 @@ namespace Emby.Server.Implementations.HttpServer
}; };
await OnReceive(info).ConfigureAwait(false); await OnReceive(info).ConfigureAwait(false);
// Stop reading if there's no more data coming
if (result.IsCompleted)
{
return;
}
} }
} }
} }

@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Session
private readonly ISessionManager _sessionManager; private readonly ISessionManager _sessionManager;
private readonly SessionInfo _session; private readonly SessionInfo _session;
private List<IWebSocketConnection> _sockets; private readonly List<IWebSocketConnection> _sockets;
private bool _disposed = false; private bool _disposed = false;
public WebSocketController( public WebSocketController(

@ -2,15 +2,14 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Model.Events; using MediaBrowser.Model.Events;
using MediaBrowser.Model.Services;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
namespace MediaBrowser.Controller.Net namespace MediaBrowser.Controller.Net
{ {
/// <summary> /// <summary>
/// Interface IHttpServer /// Interface IHttpServer.
/// </summary> /// </summary>
public interface IHttpServer : IDisposable public interface IHttpServer
{ {
/// <summary> /// <summary>
/// Gets the URL prefix. /// Gets the URL prefix.

Loading…
Cancel
Save