public GhostscriptStdIO(bool attachStdIn, bool attachStdOut, bool attachStdErr) { if (attachStdIn) { _std_in = new gsapi_stdio_callback(gs_std_in); } if (attachStdOut) { _std_out = new gsapi_stdio_callback(gs_std_out); } if (attachStdErr) { _std_err = new gsapi_stdio_callback(gs_std_err); } }
/// <summary> /// Initializes a new instance of the Ghostscript.NET.GhostscriptStdIO class. /// </summary> /// <param name="handleStdIn">Whether or not to handle Ghostscript standard input.</param> /// <param name="handleStdOut">Whether or not to handle Ghostscript standard output.</param> /// <param name="handleStdErr">Whether or not to handle Ghostscript standard errors.</param> public GhostscriptStdIO(bool handleStdIn, bool handleStdOut, bool handleStdErr) { // check if we need to handle standard input if (handleStdIn) { // attach standard input handler _std_in = new gsapi_stdio_callback(gs_std_in); } // check if we need to handle standard output if (handleStdOut) { // attach standard output handler _std_out = new gsapi_stdio_callback(gs_std_out); } // check if we need to handle errors if (handleStdErr) { // attach error handler _std_err = new gsapi_stdio_callback(gs_std_err); } }