public void Close() { if (_formatHandler != null) { _formatHandler = null; } if (_interpreter != null) { _interpreter.Dispose(); _interpreter = null; } }
public void Open(GhostscriptVersionInfo versionInfo, bool dllFromMemory) { if (versionInfo == null) { throw new ArgumentNullException("versionInfo"); } this.Close(); _filePath = string.Empty; _interpreter = new GhostscriptInterpreter(versionInfo, dllFromMemory); this.Open(); }
public void Open(byte[] library) { if (library == null) { throw new ArgumentNullException("library"); } this.Close(); _filePath = string.Empty; _interpreter = new GhostscriptInterpreter(library); this.Open(); }
public void Open(string path, byte[] library) { if (!File.Exists(path)) { throw new FileNotFoundException("Could not find input file.", path); } if (library == null) { throw new ArgumentNullException("library"); } this.Close(); _filePath = path; _interpreter = new GhostscriptInterpreter(library); this.Open(); }
public void Open(string path, GhostscriptVersionInfo versionInfo, bool dllFromMemory) { if (!File.Exists(path)) { throw new FileNotFoundException("Could not find input file.", path); } if (versionInfo == null) { throw new ArgumentNullException("versionInfo"); } this.Close(); _filePath = path; _interpreter = new GhostscriptInterpreter(versionInfo, dllFromMemory); this.Open(); }
protected virtual void Dispose(bool disposing) { if (!_disposed) { if (disposing) { if (_formatHandler != null) { _formatHandler.Dispose(); _formatHandler = null; } if (_interpreter != null) { _interpreter.Dispose(); _interpreter = null; } } _fileCleanupHelper.Cleanup(); _disposed = true; } }
public void Open(byte[] gsDll) { if (gsDll == null) { throw new ArgumentNullException("gsDll", "Cannot be null."); } this.Close(); _filePath = string.Empty; _interpreter = new GhostscriptInterpreter(gsDll); this.Open(); }
public void Open(string path, byte[] gsDll) { if (!File.Exists(path)) { throw new FileNotFoundException("Could not find input file.", path); } if (gsDll == null) { throw new ArgumentNullException("gsDll", "Cannot be null."); } this.Close(); _filePath = path; _interpreter = new GhostscriptInterpreter(gsDll); this.Open(); }