コード例 #1
0
        public static async Task <TriggerIt> TriggerItWithImmediateTimerAsync(bool history = false)
        {
            var s = new TriggerIt(new Mock.ImmediateTimer(100), (history ? (Persisting.IPersitor) new Mock.PersistorWithHistory() : new Mock.PersistorWithoutHistory()));

            s.DateTimeService = new Mock.DateTimeService();

            await s.InitializeInternalAsync();

            return(s);
        }
コード例 #2
0
        public static async Task <(TriggerIt triggerIt, Mock.ManualTimer timer)> TriggerItWithManualTimerAsync(bool history = false)
        {
            var timer = new Mock.ManualTimer();
            var s     = new TriggerIt(timer, (history ? (Persisting.IPersitor) new Mock.PersistorWithHistory() : new Mock.PersistorWithoutHistory()));

            s.DateTimeService = new Mock.DateTimeService();

            await s.InitializeInternalAsync();

            return(s, timer);
        }