internal AsyncStringCompletedEventArgs(AsyncDataCompletedEventArgs e, Encoding responseEncoding, object userState) { Cancelled = e.Cancelled; Error = e.Error; Result = responseEncoding.GetString(e.Result); UserState = userState; }
private static void DownloadDataCallback(AsyncDataCompletedEventArgs e) { var wrap = e.UserState as StringWrap; if (wrap != null) { wrap.Callback(new AsyncStringCompletedEventArgs(e, wrap.ResponseEncoding, wrap.UserState)); } }