From ca5c20c9889f2c279f0b9d80ce776ddc8ee31ad1 Mon Sep 17 00:00:00 2001 From: crobibero Date: Thu, 3 Dec 2020 07:34:15 -0700 Subject: Remove IIsoMounter and IsoMounter --- Emby.Server.Implementations/IO/IsoManager.cs | 67 ---------------------------- 1 file changed, 67 deletions(-) delete mode 100644 Emby.Server.Implementations/IO/IsoManager.cs (limited to 'Emby.Server.Implementations/IO') diff --git a/Emby.Server.Implementations/IO/IsoManager.cs b/Emby.Server.Implementations/IO/IsoManager.cs deleted file mode 100644 index 94e92c2a6..000000000 --- a/Emby.Server.Implementations/IO/IsoManager.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Model.IO; - -namespace Emby.Server.Implementations.IO -{ - /// - /// Class IsoManager. - /// - public class IsoManager : IIsoManager - { - /// - /// The _mounters. - /// - private readonly List _mounters = new List(); - - /// - /// Mounts the specified iso path. - /// - /// The iso path. - /// The cancellation token. - /// . - public Task Mount(string isoPath, CancellationToken cancellationToken) - { - if (string.IsNullOrEmpty(isoPath)) - { - throw new ArgumentNullException(nameof(isoPath)); - } - - var mounter = _mounters.FirstOrDefault(i => i.CanMount(isoPath)); - - if (mounter == null) - { - throw new ArgumentException( - string.Format( - CultureInfo.InvariantCulture, - "No mounters are able to mount {0}", - isoPath)); - } - - return mounter.Mount(isoPath, cancellationToken); - } - - /// - /// Determines whether this instance can mount the specified path. - /// - /// The path. - /// true if this instance can mount the specified path; otherwise, false. - public bool CanMount(string path) - { - return _mounters.Any(i => i.CanMount(path)); - } - - /// - /// Adds the parts. - /// - /// The mounters. - public void AddParts(IEnumerable mounters) - { - _mounters.AddRange(mounters); - } - } -} -- cgit v1.2.3