예제 #1
0
 public virtual void DoInvoke()
 {
     if (this.InvokeQueue == null || this.InvokeQueue.Count == 0)
     {
         return;
     }
     for (int index = 0; index < Queue.Synchronized(this.InvokeQueue).Count; ++index)
     {
         Invokable invokable = (Invokable)Queue.Synchronized(this.InvokeQueue).Dequeue();
         invokable.Method(invokable.Parameter);
     }
 }
예제 #2
0
        /// <summary>
        /// Calls all the methods that have been invoked by pulling them off the thread-safe queue.
        /// </summary>
        public virtual void DoInvoke()
        {
            if (InvokeQueue == null || InvokeQueue.Count == 0)
            {
                return;
            }

            for (int i = 0; i < Queue.Synchronized(InvokeQueue).Count; i++)
            {
                Invokable pInvoke = (Invokable)Queue.Synchronized(InvokeQueue).Dequeue();
                pInvoke.Method(pInvoke.Parameter);
            }
        }