diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2019-08-18 03:19:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-18 03:19:27 -0700 |
| commit | 25a590e8cd5305ea04ecea723e1b1d13a83203ac (patch) | |
| tree | 94737aba34a263a1f864293c4cc8c70999e3ca87 /Emby.IsoMounting/IsoMounter/LinuxMount.cs | |
| parent | 6766e04dd6d75acdd59e2612dea99bcaeb080cde (diff) | |
| parent | dc662beefeb918b6ae967acb9849a2856cfc3672 (diff) | |
Merge pull request #1636 from Bond-009/isomounter
Add analysers to Emby.IsoMounting and enable TreatWarningsAsErrors
Diffstat (limited to 'Emby.IsoMounting/IsoMounter/LinuxMount.cs')
| -rw-r--r-- | Emby.IsoMounting/IsoMounter/LinuxMount.cs | 73 |
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 - } - } |
