Represents a Ghostscript interpreter.
상속: IDisposable
예제 #1
0
        public void Close()
        {
            if (_formatHandler != null)
            {
                _formatHandler = null;
            }

            if (_interpreter != null)
            {
                _interpreter.Dispose();
                _interpreter = null;
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
        public void Open(byte[] library)
        {
            if (library == null)
            {
                throw new ArgumentNullException("library");
            }

            this.Close();

            _filePath = string.Empty;

            _interpreter = new GhostscriptInterpreter(library);

            this.Open();
        }
예제 #4
0
        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();
        }
예제 #5
0
        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();
        }
예제 #6
0
        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();
        }