diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-08-19 14:57:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-19 14:57:48 -0400 |
| commit | d95c04787cc4486f4ea5caaef20f6ac407a3f84a (patch) | |
| tree | 7e3193614c5a132ae63034c2bb7e07956a5670e6 /Emby.IsoMounting/IsoMounter/LinuxMount.cs | |
| parent | 3ba709fcc32d7255a2cb2466dde8c2479130a2bc (diff) | |
| parent | d99278da1dcac4d3c60739e864597aa01f916636 (diff) | |
Merge branch 'master' into h265
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 - } - } |
