Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public static async Task InitAsync(Persisting.IPersitor eventsPersitor)
 {
     Instance = new TriggerIt(new XamarinTimer(), eventsPersitor);
     await Instance.InitializeAsync();
 }
Exemplo n.º 4
0
 public static void TimerAgain(TriggerIt triggerIt)
 {
     triggerIt.Timer = new Mock.ImmediateTimer(100);
 }