Ejemplo n.º 1
0
		public void HandleConditionsMetEvent(object sender, ConditionsMetEventArgs e)
		{
			try
			{
				using (var client = new BackgroundServiceClient())
				{
					client.CheckSMSReplies();
				}
			}
			catch (Exception ex)
			{
				Logger.WriteError(ex);
			}
		}
Ejemplo n.º 2
0
		public void HandleConditionsMetEvent(object sender, ConditionsMetEventArgs e)
		{
			Logger.WriteInfo("DailyTask.Elapsed");

			try
			{
				foreach (var taskType in _taskTypes)
				{
					using (var client = new BackgroundServiceClient())
					{
						Logger.WriteInfo("DailyTask.Elapsed. Add " + taskType.ToString());
						client.AddTask(taskType, null);
					}
				}
			}
			catch (Exception ex)
			{
				Logger.WriteError(ex);
			}
		}