/// <summary> /// Callback of Process Downloaded Bytes async operation /// </summary> /// <param name="result">Async Result/State</param> private void ProcessDownloadedBytesFinished(IAsyncResult result) { ProcessDownloadedBytesHandler pdbh = (ProcessDownloadedBytesHandler)result.AsyncState; pdbh.EndInvoke(result); busy = false; if (Completed != null) { Completed(this); } }
/// <summary> /// Process the downloaded bytes from the webserver /// (uncompressing and reading of xml hublist) /// [non blocking] /// </summary> /// <param name="input_bytes">array of bytes received from a webserver</param> private void ProcessDownloadedBytes(byte[] input_bytes) { ProcessDownloadedBytesHandler pdbh = new ProcessDownloadedBytesHandler(ProcessDownloadedBytesAsync); IAsyncResult result = pdbh.BeginInvoke(input_bytes, new AsyncCallback(ProcessDownloadedBytesFinished), pdbh); }