Ejemplo n.º 1
0
        public void Set()
        {
            _isEventSet = true;
            if (_blockSimulation == null)
            {
                _blockSimulation = new BlockSimulationEvent(this, _engine);
                _engine.AddEvent(_blockSimulation);
            }
            else
            {
                _blockSimulationEvent.Reset();
            }

            if (_simulationEvent != null)
            {
                _engine.CancelEvent(_simulationEvent);
                _simulationEvent = null;
            }

            _mainEvent.Set();
        }
Ejemplo n.º 2
0
 internal void Block()
 {
     _blockSimulation = null;
     _blockSimulationEvent?.WaitOne();
 }
Ejemplo n.º 3
0
 public SimulatedResetEvent(SimulationEngine engine)
 {
     _engine          = engine;
     _blockSimulation = new BlockSimulationEvent(this, _engine);
     _engine.AddEvent(_blockSimulation);
 }