From dc662beefeb918b6ae967acb9849a2856cfc3672 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 16 Aug 2019 21:03:45 +0200 Subject: Add analysers to Emby.IsoMounting and enable TreatWarningsAsErrors --- Emby.Server.Implementations/IO/IsoManager.cs | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'Emby.Server.Implementations/IO/IsoManager.cs') diff --git a/Emby.Server.Implementations/IO/IsoManager.cs b/Emby.Server.Implementations/IO/IsoManager.cs index f0a15097c..94e92c2a6 100644 --- a/Emby.Server.Implementations/IO/IsoManager.cs +++ b/Emby.Server.Implementations/IO/IsoManager.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -8,12 +9,12 @@ using MediaBrowser.Model.IO; namespace Emby.Server.Implementations.IO { /// - /// Class IsoManager + /// Class IsoManager. /// public class IsoManager : IIsoManager { /// - /// The _mounters + /// The _mounters. /// private readonly List _mounters = new List(); @@ -22,9 +23,7 @@ namespace Emby.Server.Implementations.IO /// /// The iso path. /// The cancellation token. - /// IsoMount. - /// isoPath - /// + /// . public Task Mount(string isoPath, CancellationToken cancellationToken) { if (string.IsNullOrEmpty(isoPath)) @@ -36,7 +35,11 @@ namespace Emby.Server.Implementations.IO if (mounter == null) { - throw new ArgumentException(string.Format("No mounters are able to mount {0}", isoPath)); + throw new ArgumentException( + string.Format( + CultureInfo.InvariantCulture, + "No mounters are able to mount {0}", + isoPath)); } return mounter.Mount(isoPath, cancellationToken); @@ -60,16 +63,5 @@ namespace Emby.Server.Implementations.IO { _mounters.AddRange(mounters); } - - /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - /// - public void Dispose() - { - foreach (var mounter in _mounters) - { - mounter.Dispose(); - } - } } } -- cgit v1.2.3