public static void StartTasks() { foreach (var instance in RP.GetTasksReprository()) { AddTask(instance.Title, instance.StartSeconds); } }
public static void CacheItemRemoved(string k, object v, CacheItemRemovedReason r) { foreach (var instance in RP.GetTasksReprository()) { if (k == instance.Title) { try { instance.Execute(); } catch (Exception e) { SF.LogError(e); } AddTask(k, SF.RandomNumber(instance.IntervalSecondsFrom, instance.IntervalSecondsTo)); } } }