TestPoint(ISequencerTaskRegister taskRegister, ISequencerExceptionRegister exceptionRegister) { TestPointUC testPoint = new TestPointUC(taskRegister, exceptionRegister); IProductionPointUC productionMatch = null; ITestPointUC testMatch = null; using (Lock.Enter()) { TestPointQueue.Enqueue(testPoint); if (ProductionPointQueue.Count > 0 && TestPointQueue.Count > 0) { productionMatch = ProductionPointQueue.Dequeue(); testMatch = TestPointQueue.Dequeue(); } } testMatch?.Complete(productionMatch); return(testPoint); }
ProductionPoint(ISequencerTaskRegister taskRegister, ISequencerExceptionRegister exceptionRegister, SeqPointTypeUC seqPointTypeUC, object arg = null, Action <object> injectContinuation = null) { ProductionPointUC productionPoint = new ProductionPointUC(taskRegister, exceptionRegister, seqPointTypeUC, arg, injectContinuation); IProductionPointUC productionMatch = null; ITestPointUC testMatch = null; using (Lock.Enter()) { ProductionPointQueue.Enqueue(productionPoint); if (ProductionPointQueue.Count > 0 && TestPointQueue.Count > 0) { productionMatch = ProductionPointQueue.Dequeue(); testMatch = TestPointQueue.Dequeue(); } } testMatch?.Complete(productionMatch); return(productionPoint); }