public virtual Event WhenChange() { var whenChange = new Event(Environment); WhenChangeQueue.Add(whenChange); return(whenChange); }
protected virtual void TriggerWhenChange() { if (WhenChangeQueue.Count == 0) { return; } foreach (var evt in WhenChangeQueue) { evt.Succeed(); } WhenChangeQueue.Clear(); }