c# - Get fire times of a trigger -


I know that using a

  dateTimeOffset gets the next fire time of the trigger Can do? NextFireTime = Trigger. GETNextFireTimeUtc ();  

How can I get a list of all future hanging of this trigger (or at least the next X hanging if it does not end) ?

You can use GetFireTimeAfter (DateTimeOffSet? AfterTime) on the trigger .

var nextDateTime = trigger.GetNextFireTimeUtc (); // Get the next 1000 fire bar (for int i = 0; i & lt; 1000; i ++) {if (nextDateTime.HasValue) break; Console.WriteLine (nextDateTime.Value.ToLocalTime ()); NextDateTime = Trigger. GetFirsttimeAfter (Next Datam); }

Comments