コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IdleQueueTask"/> struct.
 /// </summary>
 /// <param name="priority">The priority.</param>
 /// <param name="del">The delegate.</param>
 /// <param name="parameter">The parameter.</param>
 public IdleQueueTask(IdleQueuePriority priority, Func <object, bool> del, object parameter)
 {
     m_priority  = priority;
     m_del       = del;
     m_parameter = parameter;
 }
コード例 #2
0
 /// <summary>
 /// Schedules the specified delegate to be invoked when the application
 /// is idle. A new task will be scheduled only if there is not an existing
 /// tasks with the delegate in the queue.
 /// </summary>
 /// <param name="priority">The priority.</param>
 /// <param name="del">The delegate.</param>
 /// <param name="parameter">The parameter.</param>
 public void Add(IdleQueuePriority priority, Func <object, bool> del, object parameter)
 {
     CheckDisposed();
     Add(priority, del, parameter, true);
 }
コード例 #3
0
 /// <summary>
 /// Schedules the specified delegate to be invoked when the application
 /// is idle. A new task will be scheduled only if there is not an existing
 /// tasks with the delegate in the queue.
 /// </summary>
 /// <param name="priority">The priority.</param>
 /// <param name="del">The delegate.</param>
 public void Add(IdleQueuePriority priority, Func <object, bool> del)
 {
     CheckDisposed();
     Add(priority, del, null);
 }
コード例 #4
0
 /// <summary>
 /// Schedules the specified delegate to be invoked when the application
 /// is idle.
 /// </summary>
 /// <param name="priority">The priority.</param>
 /// <param name="del">The delegate.</param>
 /// <param name="parameter">The parameter.</param>
 /// <param name="update">if set to <c>true</c> any existing tasks with the
 /// delegate that are in the queue will be updated instead of a new task being added</param>
 public void Add(IdleQueuePriority priority, Func <object, bool> del, object parameter, bool update)
 {
     CheckDisposed();
     lock (SyncRoot)
         m_queue.Enqueue(priority, new IdleQueueTask(priority, del, parameter), update);
 }