static void Main(string[] args) { manager = new EscalationManager(); // Pass in the time you want to start and the interval // Run the service every 24hrs at 3AM var startHour = Convert.ToInt32(ConfigurationManager.AppSettings["StartHour"]); var startMinutes = Convert.ToInt32(ConfigurationManager.AppSettings["StartMinutes"]); var startSeconds = Convert.ToInt32(ConfigurationManager.AppSettings["StartSeconds"]); var runEveryHours = Convert.ToInt32(ConfigurationManager.AppSettings["RunEveryHours"]); var runEveryMinutes = Convert.ToInt32(ConfigurationManager.AppSettings["RunEveryMinutes"]); var runEverySeconds = Convert.ToInt32(ConfigurationManager.AppSettings["RunEverySeconds"]); StartTimer(new TimeSpan(startHour, startMinutes, startSeconds), new TimeSpan(runEveryHours, runEveryMinutes, runEverySeconds)); }
public static void MenuSortByType(MenuCommand command) { EscalationManager manager = (EscalationManager)command.context; manager.SortEscalationConditionsByType(); }
void Awake() { g_instance = this; prepareEscalationsOfStates(); preparePersonStatesArray(); }
protected override void OnStop() { _timer = null; manager = null; }
public Service() { InitializeComponent(); manager = new EscalationManager(); }