Ejemplo n.º 1
0
        public void Dispose()
        {
            if (!IsDisposed)
            {
                FinishStream();
            }

            IsDisposed = true;

            InStream?.Dispose();
            OutStream?.Dispose();
            ErrorStream?.Dispose();
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (!_isDisposed)
            {
                if (_objectsToDispose != null)
                {
                    foreach (var h in _objectsToDispose)
                    {
                        h.Dispose();
                    }
                }

                _inputReadPipe?.Dispose();
                _outputWritePipe?.Dispose();
                _errorWritePipe?.Dispose();
                InputStream?.Dispose();
                OutputStream?.Dispose();
                ErrorStream?.Dispose();
                _isDisposed = true;
            }
        }