Beispiel #1
0
 public void TriggerHandler(object sender, TriggerFiredEventArgs e)
 {
     foreach (TriggerRecord record in eventDistributor.triggerQueue)
     {
         if (triggersInUse.Contains(record.ID) && triggersThisLine.Contains(record.ID))
         {
             messagesSent++;
             Report(null, messagesSent, 0, 0);
             if (e.Flight != null)
             {
                 Report($"Next Event {record.ID} for {record.record.Item2.DisplayFlight} at {record.TIME}.", messagesSent, 0, 0);
                 SetSourceLineOutput($"Trigger: {e.TriggerName}. Fired for {e.Flight.airlineCode}{e.Flight.fltNumber} at {DateTime.Now}. Next Event {record.ID} for {record.record.Item2.DisplayFlight} at {record.TIME}.");
                 return;
             }
             else
             {
                 Report($"Next Event {record.ID}  at {record.TIME}.", messagesSent, 0, 0);
                 SetSourceLineOutput($"Trigger: {e.TriggerName} at {DateTime.Now}. Next Event {record.ID}  at {record.TIME}.");
                 return;
             }
         }
     }
     messagesSent++;
     Report($"Trigger: {e.TriggerName} at {DateTime.Now}. No further scheduled events", messagesSent, 0, 0);
     SetSourceLineOutput($"Trigger: {e.TriggerName} at {DateTime.Now}. No further scheduled events");
     executionController.CheckForCompletion();
 }
        // Called when one of the messages is sent
        public void TriggerHandler(object sender, TriggerFiredEventArgs e)
        {
            if (intervalMessagesPerMinute < 1500)
            {
                sourceLogger.Info($"Rate Event Fired. Source: {name}");
                return;
            }

            if (intervalCount % Parameters.REPORTEPOCH == 0)
            {
                sourceLogger.Info($"Rate Event Fired. Source: {name}. {Parameters.REPORTEPOCH} instances");
            }
        }
 internal void TriggerHandler(object sender, TriggerFiredEventArgs e)
 {
     ProcessIteration(e.record).Wait();
 }