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