コード例 #1
0
ファイル: ProgramContext.cs プロジェクト: mhotwagner/KOS
 /// <summary>
 /// Remove a trigger from current triggers or pending insertion
 /// triggers or both if need be, so it's not there anymore at all.
 /// </summary>
 /// <param name="trigger"></param>
 public void RemoveTrigger(TriggerInfo trigger)
 {
     Triggers.RemoveAll((item) => item.Equals(trigger));         // can ignore if it wasn't in the list.
     TriggersToInsert.RemoveAll((item) => item.Equals(trigger)); // can ignore if it wasn't in the list.
 }
コード例 #2
0
 /// <summary>
 /// Take only those pending triggers that AddPendingTrigger added who's
 /// Priority is higher than the given value, and make them become active.
 /// ("active" here means "called on the callstack like a subroutine.")
 /// </summary>
 /// <param name="aboveThis"></param>
 public void ActivatePendingTriggersAbovePriority(InterruptPriority aboveThis)
 {
     Triggers.AddRange(TriggersToInsert.FindAll(t => t.Priority > aboveThis));
     TriggersToInsert.RemoveAll(t => t.Priority > aboveThis);
 }