static void Main(string[] args) { //var device = FirebaseGateway.GetDevice("duzgt9Ubnxo:APA91bEYuVNGByPeAo292pIADQzOjTSA49Ly0ZKQ37INJdENTId1pn8HDHtAXQ3krRmoIEHIRaAvkIsYxADT0MGyZm58fQZGVebZz5DiUFRNLIAGd_mGR7XGnoVqGvqyjJBVAMucXaWw"); //FirebaseGateway.UpdateDevice(device); ////device.addresses_v2.p0.tokens = new System.Collections.Generic.List<Token>() { new Token() {token = "TAP", contractAddress = "cxc0b5b52c9f8b4251a47e91dda3bd61e5512cd782" } }; //ProcessDeviceAddress(device, device.addresses_v2.p0); //foreach (var token in device.addresses_v2.p0.tokens.AsEnumerator()) //{ // ProcessDeviceToken(device, device.addresses_v2.p0, token); //} Console.WriteLine("[MAIN] STARTING APPLICATION TIMER v2.11"); timer.Elapsed += Timer_Elapsed; timer.Interval = timerInterval * 1000; timer.Start(); timerPrep.Elapsed += TimerPrep_Elapsed; timerPrep.Interval = timerPrepInterval * 1000; timerPrep.Start(); AllPReps = IconGateway.GetAllPReps(); while (true) { System.Threading.Thread.Sleep(1000); } }
private static void TimerPrep_Elapsed(object sender, ElapsedEventArgs e) { timerPrep.Stop(); try { Console.WriteLine("[MAIN] PREP TIMER ELAPSED, Checking all PReps"); AllPReps = IconGateway.GetAllPReps(); Console.WriteLine($"[MAIN] Retrieved {AllPReps.Preps.Count} P-Reps"); } finally { timerPrep.Start(); } }