示例#1
0
        public IAsyncResult OnBeginExceptions(object sender, EventArgs e, AsyncCallback cb, object extraData)
        {
            _IMSDeligate = new AsyncTaskDelegate(ExecuteAsyncTaskExceptions);
            IAsyncResult result = _IMSDeligate.BeginInvoke(cb, extraData);

            return(result);
        }
示例#2
0
        public IAsyncResult OnBegin(object sender, EventArgs e,
            AsyncCallback cb, object extraData)
        {
            _dlgt = new AsyncTaskDelegate(ExecuteAsyncTask);
            IAsyncResult result = _dlgt.BeginInvoke(cb, extraData);

            return result;
        }
示例#3
0
        // Define the method that will get called to
        // start the asynchronous task.
        public IAsyncResult OnBegin(object sender, EventArgs e,
                                    AsyncCallback cb, object extraData)
        {
            _taskprogress = "Beginning async task.";

            _dlgt = new AsyncTaskDelegate(DoTheAsyncTask);
            IAsyncResult result = _dlgt.BeginInvoke(cb, extraData);

            return(result);
        }
示例#4
0
        // Define the method that will get called to
        // start the asynchronous task.
        public IAsyncResult OnBegin(object sender, EventArgs e,
            AsyncCallback cb, object extraData)
        {
            _taskprogress = "AsyncTask started at: " + DateTime.Now + ". ";

            _dlgt = new AsyncTaskDelegate(ExecuteAsyncTask);
            IAsyncResult result = _dlgt.BeginInvoke(cb, extraData);

            return result;
        }
示例#5
0
        // Define the method that will get called to
        // start the asynchronous task.
        public IAsyncResult OnBegin(object sender, EventArgs e,
                                    AsyncCallback cb, object extraData)
        {
            OnStatusChanged(_taskprogress);

            _dlgt = new AsyncTaskDelegate(ExecuteAsyncTask);
            IAsyncResult result = _dlgt.BeginInvoke(cb, extraData);

            return(result);
        }
        // Define the method that will get called to
        // start the asynchronous task.
        public IAsyncResult OnBegin(object sender, EventArgs e,
                                    AsyncCallback cb, object extraData)
        {
            _taskprogress = "AsyncTask started at: " + DateTime.Now + ". ";

            _dlgt = new AsyncTaskDelegate(ExecuteAsyncTask);
            IAsyncResult result = _dlgt.BeginInvoke(cb, extraData);

            return(result);
        }
        // Define the method that will get called to
        // start the asynchronous task.
        public IAsyncResult OnBegin(object sender, EventArgs e,
            AsyncCallback cb, object extraData)
        {
            _taskprogress = "Beginning async task.";

            _dlgt = new AsyncTaskDelegate(DoTheAsyncTask);
            IAsyncResult result = _dlgt.BeginInvoke(cb, extraData);

            return result;
        }
示例#8
0
        // Define the method that will get called to
        // start the asynchronous task.
        public IAsyncResult OnBegin(object sender, EventArgs e,
                                    AsyncCallback cb, object extraData)
        {
            _listPro = index.Loadindex(1, 2, 10);
            foreach (var i in _listPro)
            {
                _taskprogress = "Beginning async task." + i.NEWS_TITLE;
                _dlgt         = new AsyncTaskDelegate(DoTheAsyncTask);
            }

            IAsyncResult result = _dlgt.BeginInvoke(cb, _listPro);

            return(result);
        }
        // Define the method that will get called to 
        // start the asynchronous task. 
        public IAsyncResult OnBegin(object sender, EventArgs e,
            AsyncCallback cb, object extraData)
        {
            _listPro = index.Loadindex(1, 2, 10);
            foreach (var i in _listPro)
            {
                _taskprogress = "Beginning async task."+i.NEWS_TITLE;
                _dlgt = new AsyncTaskDelegate(DoTheAsyncTask);
            }
         
            IAsyncResult result = _dlgt.BeginInvoke(cb, _listPro);

            return result;
        }
 public IAsyncResult BeginHandler(object src, EventArgs e, AsyncCallback cb, object state)
 {
     IAsyncResult result = null;
     try 
     {
         _runnerDelegate = new AsyncTaskDelegate(this.LoadData);
        result = _runnerDelegate.BeginInvoke(cb, state);
     }
     catch (Exception exception)
     {
         ErrorService.Log("AsyncUserControl", "BeginHandler", "", exception);
         Trace.Write("AsyncUserControl", "EndHandler", exception);
     }
     return result;
 }
示例#11
0
        private IAsyncResult BeginHandler(object sender, EventArgs e, AsyncCallback cb, object extradata)
        {
            AsyncTaskDelegate d = new AsyncTaskDelegate(GetServiceInfo);

            return(d.BeginInvoke(cb, extradata));
        }
示例#12
0
 private void AsyncGenerate()
 {
     AsyncTaskDelegate asyncTask = new AsyncTaskDelegate(Generate);
     IAsyncResult      ar        = asyncTask.BeginInvoke(new AsyncCallback(AsyncTaskCallback), null);
 }
示例#13
0
        public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData)
        {
            this.del = new AsyncTaskDelegate(ProcessRequest);

            return(del.BeginInvoke(context, cb, extraData));
        }
示例#14
0
 public IAsyncResult OnBegin(object sender, EventArgs e, AsyncCallback cb, object extraData)
 {
     _taskprogress = string.Format("Streaming started at: {0}{1}", DateTime.Now.ToLongTimeString(), "\n");
     _delegate = new AsyncTaskDelegate(ExecuteAsyncTask);
     IAsyncResult result = _delegate.BeginInvoke(cb, extraData);
     return result;
 }