Exemple #1
0
        protected virtual void RaiseComplete(TaskCompleteEventArgs e)
        {
            EventHandler <TaskCompleteEventArgs> h = Completed;

            if (h != null)
            {
                h(this, e);
            }
        }
        private void TaskComplete(object o, TaskCompleteEventArgs e)
        {
            task.Completed -= TaskComplete;

            SendQueryEventArgs args = (SendQueryEventArgs)e;
            if (args.TimedOut)
            {
                bucket.SortBySeen();
                int index = bucket.Nodes.IndexOf(node);
                if (index == -1 || (++index < bucket.Nodes.Count))
                {
                    QueryNode(bucket.Nodes[0]);
                }
                else
                {
                    RaiseComplete(new TaskCompleteEventArgs(this));
                }
            }
            else
            {
                RaiseComplete(new TaskCompleteEventArgs(this));
            }
        }
Exemple #3
0
        private void TaskComplete(object o, TaskCompleteEventArgs e)
        {
            task.Completed -= TaskComplete;

            SendQueryEventArgs args = (SendQueryEventArgs)e;

            if (args.TimedOut)
            {
                bucket.SortBySeen();
                int index = bucket.Nodes.IndexOf(node);
                if (index == -1 || (++index < bucket.Nodes.Count))
                {
                    QueryNode(bucket.Nodes[0]);
                }
                else
                {
                    RaiseComplete(new TaskCompleteEventArgs(this));
                }
            }
            else
            {
                RaiseComplete(new TaskCompleteEventArgs(this));
            }
        }
Exemple #4
0
 protected virtual void RaiseComplete(TaskCompleteEventArgs e)
 {
     EventHandler<TaskCompleteEventArgs> h = Completed;
     if (h != null)
         h(this, e);
 }
 protected virtual void RaiseComplete(TaskCompleteEventArgs e)
 {
     var h = Completed;
     if (h != null)
         h(this, e);
 }