コード例 #1
0
        /// <summary>
        /// Disposes of this instance, freeing underlying resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> if called from Dispose.</param>
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    if (_content != null)
                    {
                        _content.Dispose();
                        _content = null;
                    }

                    if (_file != null)
                    {
                        _file.Dispose();
                        _file = null;
                    }
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the Disk class.
 /// </summary>
 /// <param name="stream">The stream containing the disk.</param>
 /// <param name="ownsStream">Whether the new instance takes ownership of stream.</param>
 public Disk(Stream stream, Ownership ownsStream)
 {
     _file = new DiskImageFile(stream, ownsStream);
 }
コード例 #3
0
ファイル: Disk.cs プロジェクト: JGTM2016/discutils
 /// <summary>
 /// Initializes a new instance of the Disk class.
 /// </summary>
 /// <param name="stream">The stream containing the disk</param>
 /// <param name="ownsStream">Whether the new instance takes ownership of stream</param>
 public Disk(Stream stream, Ownership ownsStream)
 {
     _file = new DiskImageFile(stream, ownsStream);
 }
コード例 #4
0
ファイル: Disk.cs プロジェクト: JGTM2016/discutils
        /// <summary>
        /// Disposes of this instance, freeing underlying resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> if called from Dispose</param>
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    if (_content != null)
                    {
                        _content.Dispose();
                        _content = null;
                    }

                    if (_file != null)
                    {
                        _file.Dispose();
                        _file = null;
                    }
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }