// CHECK FOR SCHEDULING METHODS public bool IsScheduledEventWithTag(string tag) { if (string.IsNullOrEmpty(tag)) { return(false); } foreach (float timeKey in EventsDict.Keys) { TimeEvent currentEvent = EventsDict[timeKey]; if (tag.Equals(currentEvent.tag, StringComparison.Ordinal) && !KeysToRemove.Contains(timeKey)) { return(true); } } return(false); }
public List <TimeEvent> TimeEventsWithTag(string tag) { List <TimeEvent> result = new List <TimeEvent>(); foreach (float timeKey in EventsDict.Keys) { TimeEvent currentEvent = EventsDict[timeKey]; if (currentEvent != null) { if (tag.Equals(currentEvent.tag, StringComparison.Ordinal) && !KeysToRemove.Contains(timeKey)) { result.Add(currentEvent); } } } return(result); }