/// <summary> /// Close the file and dispose it /// </summary> public override void Close() { try { if (!_fileOpen) { return; } foreach (Track track in _tracks) { if (track.IsData && !((DataTrackWriter)track).IsFinalized) { throw new FrameworkException("Error while closing ISO : data track is not finalized, it will be unreadable"); } } // Create CUE sheet CreateCue(); _stream.CloseAndDispose(); _fileOpen = false; } catch (FrameworkException ex) { throw ex; } catch (Exception) { throw new FrameworkException("Error while closing ISO : unable to close the ISO"); } }