public SyncLinkProcessor() { List <int> linkIDs = DatabaseInterface.GetLinksToSync(); foreach (int linkID in linkIDs) { try { SyncAction sa = new SyncAction(linkID); syncActions.Add(sa); Task <bool> syncTask = sa.ProcessSyncAsync(); syncTasks.Add(syncTask); } catch (Exception ex) { Log.AddLog("SyncAction error: " + ex.Message, ErrorLevels.Critical); } } }
public OnboardingManager() { List <int> linkIDs = DatabaseInterface.GetLinksToSync(); foreach (int linkID in linkIDs) { try { OnboardingCheck obc = new OnboardingCheck(linkID); onboardingChecks.Add(obc); Task <bool> onboardingTask = obc.ProcessOBCheckAsync(); onboardingTasks.Add(onboardingTask); } catch (Exception ex) { Log.AddLog("SyncAction error: " + ex.Message, ErrorLevels.Critical); } } }