Пример #1
0
        private void RaiseTimeOutEvent(T timedOutItem)
        {
            // For thread-safety (delegates are immutable)
            ItemTimedOutEventHandler <T> tempDelegate = ItemTimedOut;

            if (tempDelegate != null)
            {
                tempDelegate.Invoke(new ItemTimedOutEventArgs <T>(timedOutItem));
            }
        }
Пример #2
0
        private void RaiseTimeoutEvents(ItemTimedOutEventArgs <T> timedOut)
        {
            // For thread-safety (delegates are immutable)
            ItemTimedOutEventHandler <T> tempDelegate = this.ItemTimedOut;

            if (tempDelegate != null)
            {
                tempDelegate.Invoke(timedOut);
            }
        }