/// <summary> /// Internal constructor: instances of this object should /// be obtained from the <see cref="DiscMaster"/> object. /// </summary> /// <param name="owner">Disc master object which owns this object.</param> /// <param name="redbookMaster">Imapi redbook disc mastering object to wrap.</param> /// <exception cref="ArgumentNullException"></exception> internal RedbookDiscMaster( DiscMaster owner, IRedbookDiscMaster redbookMaster ) { if ( owner == null ) { throw new ArgumentNullException( "owner" ); } // End if (owner == null) if ( redbookMaster == null ) { throw new ArgumentNullException( "redbookMaster" ); } // End if (redbookMaster == null) _owner = owner; _redbookMaster = redbookMaster; SyncRoot = new object(); }
/// <summary> /// Disposes the specified disposing. /// </summary> /// <param name="disposing"> /// If disposing equals false, the method has been called by the /// runtime from inside the finalizer and you should not reference /// other objects. Only unmanaged resources can be disposed. /// </param> protected override void Dispose( bool disposing ) { // Check to see if Dispose has already been called. if ( disposing && !IsDisposed ) { // Dispose managed resources. Marshal.ReleaseComObject( _redbookMaster ); _redbookMaster = null; if ( _buffer != null ) { _buffer.Dispose(); _buffer = null; } // End if } base.Dispose( disposing ); }