Exemplo n.º 1
0
        public void StatrtWaitingFor(IEnumerable <ProcessStatus> statuses)
        {
            _handle.Reset();
            _wasSet = false;

            _statusesForWaiting = statuses.ToList();

            _runtime.ProcessSatusChanged += RuntimeProcessSatusChanged;

            if (!_wasSet)
            {
                var currentStatus = _runtime.GetProcessStatus(_processId);
                if (_statusesForWaiting.Contains(currentStatus))
                {
                    _handle.Set();
                }
            }
        }