Exemple #1
0
 internal AsyncStringCompletedEventArgs(AsyncDataCompletedEventArgs e, Encoding responseEncoding,
                                        object userState)
 {
     Cancelled = e.Cancelled;
     Error     = e.Error;
     Result    = responseEncoding.GetString(e.Result);
     UserState = userState;
 }
Exemple #2
0
        private static void DownloadDataCallback(AsyncDataCompletedEventArgs e)
        {
            var wrap = e.UserState as StringWrap;

            if (wrap != null)
            {
                wrap.Callback(new AsyncStringCompletedEventArgs(e, wrap.ResponseEncoding, wrap.UserState));
            }
        }