public virtual void RunSpec(string id, Specification specification)
        {
            if (OutstandingRequests().Any(x => x.Specification.id == id))
            {
                return;
            }

            var request = new SpecExecutionRequest(specification, this);

            _outstanding.Add(request);

            _engine.Enqueue(request);
        }
Beispiel #2
0
        public void Receive(BatchRunRequest message)
        {
            var task = _resultObserver.MonitorBatch(message.Specifications);

            message.Specifications
            .Select(SpecExecutionRequest.For)
            .Each(x => _engine.Enqueue(x));

            task.ContinueWith(t =>
            {
                EventAggregator.SendMessage(new BatchRunResponse
                {
                    records = t.Result.ToArray()
                });
            });
        }
Beispiel #3
0
        public void Receive(BatchRunRequest message)
        {
            var top   = HierarchyLoader.ReadHierarchy();
            var specs = message.Filter(top).ToArray();

            var task = _resultObserver.MonitorBatch(specs);

            specs
            .Select(SpecExecutionRequest.For)
            .Each(x => _engine.Enqueue(x));

            task.ContinueWith(t =>
            {
                EventAggregator.SendMessage(new BatchRunResponse
                {
                    records = t.Result.ToArray()
                });
            });
        }