aboutsummaryrefslogtreecommitdiff
path: root/Emby.IsoMounting/IsoMounter/LinuxMount.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.IsoMounting/IsoMounter/LinuxMount.cs')
-rw-r--r--Emby.IsoMounting/IsoMounter/LinuxMount.cs73
1 files changed, 24 insertions, 49 deletions
diff --git a/Emby.IsoMounting/IsoMounter/LinuxMount.cs b/Emby.IsoMounting/IsoMounter/LinuxMount.cs
index b8636822b..ccad8ce20 100644
--- a/Emby.IsoMounting/IsoMounter/LinuxMount.cs
+++ b/Emby.IsoMounting/IsoMounter/LinuxMount.cs
@@ -3,81 +3,56 @@ using MediaBrowser.Model.IO;
namespace IsoMounter
{
+ /// <summary>
+ /// Class LinuxMount.
+ /// </summary>
internal class LinuxMount : IIsoMount
{
+ private readonly LinuxIsoManager _linuxIsoManager;
- #region Private Fields
-
- private readonly LinuxIsoManager linuxIsoManager;
-
- #endregion
-
- #region Constructor(s)
+ private bool _disposed = false;
+ /// <summary>
+ /// Initializes a new instance of the <see cref="LinuxMount" /> class.
+ /// </summary>
+ /// <param name="isoManager">The ISO manager that mounted this ISO file.</param>
+ /// <param name="isoPath">The path to the ISO file.</param>
+ /// <param name="mountFolder">The folder the ISO is mounted in.</param>
internal LinuxMount(LinuxIsoManager isoManager, string isoPath, string mountFolder)
{
-
- linuxIsoManager = isoManager;
+ _linuxIsoManager = isoManager;
IsoPath = isoPath;
MountedPath = mountFolder;
-
}
- #endregion
-
- #region Interface Implementation for IDisposable
+ /// <inheritdoc />
+ public string IsoPath { get; }
- // Flag: Has Dispose already been called?
- private bool disposed = false;
+ /// <inheritdoc />
+ public string MountedPath { get; }
+ /// <inheritdoc />
public void Dispose()
{
-
- // Dispose of unmanaged resources.
Dispose(true);
-
- // Suppress finalization.
GC.SuppressFinalize(this);
-
}
+ /// <summary>
+ /// Releases the unmanaged resources and disposes of the managed resources used.
+ /// </summary>
+ /// <param name="disposing">Whether or not the managed resources should be disposed.</param>
protected virtual void Dispose(bool disposing)
{
-
- if (disposed)
+ if (_disposed)
{
return;
}
- if (disposing)
- {
-
- //
- // Free managed objects here.
- //
-
- linuxIsoManager.OnUnmount(this);
-
- }
-
- //
- // Free any unmanaged objects here.
- //
-
- disposed = true;
+ _linuxIsoManager.OnUnmount(this);
+ _disposed = true;
}
-
- #endregion
-
- #region Interface Implementation for IIsoMount
-
- public string IsoPath { get; private set; }
- public string MountedPath { get; private set; }
-
- #endregion
-
}
-
}