Example #1
0
        public static ProcessingStep SingleProcessingStep(this Activity.Monitoring.Model.Process process, Func <ProcessingStep, bool> predicate, TimeSpan timeout)
        {
            Assert.That(
                () => {
                using (var searchContext = new ActivityContext())
                {
                    return(searchContext.Processes.Single(p => p.ActivityID == process.ActivityID).ProcessingSteps.Where(predicate).SingleOrDefault());
                }
            },
                Is.Not.Null.After((int)timeout.TotalMilliseconds, (int)TrackingRepository.PollingInterval.TotalMilliseconds));

            TrackingRepository.Refresh(process, p => p.ProcessingSteps);
            return(process.ProcessingSteps.Where(predicate).Single());
        }
Example #2
0
 public static ProcessingStep SingleProcessingStep(this Activity.Monitoring.Model.Process process, Func <ProcessingStep, bool> predicate)
 {
     return(process.SingleProcessingStep(predicate, TrackingRepository.Timeout));
 }