Esempio n. 1
0
        private static TimeTrigger CreateTimeTrigger(EventWaitHandle wait, TimeSpan period)
        {
            var trigg = new TimeTrigger(period);

            trigg.TimerElapsed += (s, d) => wait.Set();
            return(trigg);
        }
Esempio n. 2
0
        public void TriggerToSmallTimeSpan()
        {
            // Act: Create TimeTrigger with span < 1ms (should throw an exception)
            var trigg = new TimeTrigger(new TimeSpan(50));

            Assert.IsNull(trigg);
        }