/// <summary>
 /// Disposes of resources used for the process. If <see cref="ProcessStartInfo.KillOnClose"/> was set, this also terminates the process.
 /// </summary>
 public void Dispose()
 {
     if (_stdin != null)
     {
         _stdin.Dispose();
     }
     if (_stdout != null)
     {
         _stdout.Dispose();
     }
     if (_stderr != null)
     {
         _stderr.Dispose();
     }
     if (_killOnClose)
     {
         Kill();
     }
     _watcher.Dispose();
     if (_p != IntPtr.Zero)
     {
         HcsFunctions.ProcessHcsCall(HcsFunctions.HcsCloseProcess(_p), null);
         _p = IntPtr.Zero;
     }
 }
 /// <summary>
 /// Disposes of resources used for the process. If <see cref="ProcessStartInfo.KillOnClose"/> was set, this also terminates the process.
 /// </summary>
 public void Dispose()
 {
     if (_stdin != null)
     {
         _stdin.Dispose();
     }
     if (_stdout != null)
     {
         _stdout.Dispose();
     }
     if (_stderr != null)
     {
         _stderr.Dispose();
     }
     if (_killOnClose)
     {
         Kill();
     }
     _watcher.Dispose();
     if (_p != IntPtr.Zero)
     {
         _hcs.CloseProcess(_p);
         _p = IntPtr.Zero;
     }
 }
        /// <summary>
        /// Disposes of the container object.
        /// </summary>
        public void Dispose()
        {
            if (_killOnClose && !_dead)
            {
                Kill();
            }

            _watcher.Dispose();

            if (_cs != IntPtr.Zero)
            {
                _hcs.CloseComputeSystem(_cs);
                _cs = IntPtr.Zero;
            }
        }
Exemple #4
0
        /// <summary>
        /// Disposes of the container object.
        /// </summary>
        public void Dispose()
        {
            if (_killOnClose && !_dead)
            {
                Kill();
            }

            _watcher.Dispose();

            if (_cs != IntPtr.Zero)
            {
                HcsFunctions.ProcessHcsCall(HcsFunctions.HcsCloseComputeSystem(_cs), null);
                _cs = IntPtr.Zero;
            }
        }