/// <summary> /// Determines whether this instance is pending the specified ev. /// </summary> /// <returns> /// <c>true</c> if this instance is pending the specified ev; otherwise, <c>false</c>. /// </returns> /// <param name='ev'> /// If set to <c>true</c> ev. /// </param> internal static bool IsPending(Event ev) { return _pendingAddPrimary.Contains(ev) || _pendingAddSecondary.Contains(ev); }
/// <summary> /// Extends this instance by creating a new Event and setting the sibl. /// </summary> public Event Extend() { Event newEvent = new Event (); Next = newEvent; newEvent.Previous = this; return newEvent; }
/// <summary> /// Adds an event to the 'pending add' list. /// </summary> /// <param name='newEvent'> /// The new event we're adding. /// </param> internal static void AddEvent(Event newEvent, bool startImmediately) { if(startImmediately) { newEvent.StartEvent (); _currentEvents.Add (newEvent); } else if (!_lockAdd) { _pendingAddPrimary.Add (newEvent); } else { _pendingAddSecondary.Add (newEvent); } }