aboutsummaryrefslogtreecommitdiff
path: root/Emby.IsoMounting/IsoMounter/LinuxMount.cs
diff options
context:
space:
mode:
authorAndrew Rabert <ar@nullsum.net>2018-12-10 18:39:20 -0500
committerVasily <JustAMan@users.noreply.github.com>2018-12-11 04:05:50 +0300
commit59750496d590b06b80cf781817d77031b1749d4e (patch)
treeb8a917a82f4b82c63119cd7e4ed5996c4a116490 /Emby.IsoMounting/IsoMounter/LinuxMount.cs
parent764e6951c33671107bee3142cb502311240760cc (diff)
Move submodules into repo
There's little value, if any, by having these as separate modules.
Diffstat (limited to 'Emby.IsoMounting/IsoMounter/LinuxMount.cs')
-rw-r--r--Emby.IsoMounting/IsoMounter/LinuxMount.cs85
1 files changed, 85 insertions, 0 deletions
diff --git a/Emby.IsoMounting/IsoMounter/LinuxMount.cs b/Emby.IsoMounting/IsoMounter/LinuxMount.cs
new file mode 100644
index 0000000000..8d1f56e395
--- /dev/null
+++ b/Emby.IsoMounting/IsoMounter/LinuxMount.cs
@@ -0,0 +1,85 @@
+using System;
+using MediaBrowser.Model.Diagnostics;
+using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Logging;
+using MediaBrowser.Model.System;
+
+namespace IsoMounter
+{
+ internal class LinuxMount : IIsoMount
+ {
+
+ #region Private Fields
+
+ private readonly LinuxIsoManager linuxIsoManager;
+
+ #endregion
+
+ #region Constructor(s)
+
+ internal LinuxMount(LinuxIsoManager isoManager, string isoPath, string mountFolder)
+ {
+
+ linuxIsoManager = isoManager;
+
+ IsoPath = isoPath;
+ MountedPath = mountFolder;
+
+ }
+
+ #endregion
+
+ #region Interface Implementation for IDisposable
+
+ // Flag: Has Dispose already been called?
+ private bool disposed = false;
+
+ public void Dispose()
+ {
+
+ // Dispose of unmanaged resources.
+ Dispose(true);
+
+ // Suppress finalization.
+ GC.SuppressFinalize(this);
+
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+
+ if (disposed) {
+ return;
+ }
+
+ if (disposing) {
+
+ //
+ // Free managed objects here.
+ //
+
+ linuxIsoManager.OnUnmount(this);
+
+ }
+
+ //
+ // Free any unmanaged objects here.
+ //
+
+ disposed = true;
+
+ }
+
+ #endregion
+
+ #region Interface Implementation for IIsoMount
+
+ public string IsoPath { get; private set; }
+ public string MountedPath { get; private set; }
+
+ #endregion
+
+ }
+
+}
+