private void OnGetDraftMessageByUserIdAndGroupIdOperationCompleted(object arg) { if ((this.GetDraftMessageByUserIdAndGroupIdCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDraftMessageByUserIdAndGroupIdCompleted(this, new GetDraftMessageByUserIdAndGroupIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnGetCommercialCofinancingOperationCompleted(object arg) { if ((this.GetCommercialCofinancingCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetCommercialCofinancingCompleted(this, new GetCommercialCofinancingCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnnfeInutilizacaoNF2OperationCompleted(object arg) { if ((this.nfeInutilizacaoNF2Completed != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.nfeInutilizacaoNF2Completed(this, new nfeInutilizacaoNF2CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OngetAllNegativeFeedsOfProfileOperationCompleted(object arg) { if ((this.getAllNegativeFeedsOfProfileCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.getAllNegativeFeedsOfProfileCompleted(this, new getAllNegativeFeedsOfProfileCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnTwitterFeedSentimentOperationCompleted(object arg) { if ((this.TwitterFeedSentimentCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.TwitterFeedSentimentCompleted(this, new TwitterFeedSentimentCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnGetPostSentimentsFromUclassifyOperationCompleted(object arg) { if ((this.GetPostSentimentsFromUclassifyCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPostSentimentsFromUclassifyCompleted(this, new GetPostSentimentsFromUclassifyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnRemoveUsersFromRolesOperationCompleted(object arg) { if ((this.RemoveUsersFromRolesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RemoveUsersFromRolesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnUpdateYouTubeAccountByAdminOperationCompleted(object arg) { if ((this.UpdateYouTubeAccountByAdminCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateYouTubeAccountByAdminCompleted(this, new UpdateYouTubeAccountByAdminCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnGetImportableItemTypesOperationCompleted(object arg) { if ((this.GetImportableItemTypesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetImportableItemTypesCompleted(this, new GetImportableItemTypesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnChangeStoppageTimeOperationCompleted(object arg) { if ((this.ChangeStoppageTimeCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ChangeStoppageTimeCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnSI_EC5_CONTRACT_INVOICE_RESULT_A_OUTOperationCompleted(object arg) { if ((this.SI_EC5_CONTRACT_INVOICE_RESULT_A_OUTCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SI_EC5_CONTRACT_INVOICE_RESULT_A_OUTCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnSifarniciOperationCompleted(object arg) { if ((this.SifarniciCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SifarniciCompleted(this, new SifarniciCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnGetProductsByBidPriceAscOperationCompleted(object arg) { if ((this.GetProductsByBidPriceAscCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetProductsByBidPriceAscCompleted(this, new GetProductsByBidPriceAscCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnLoanRequestSendToReplyToOperationCompleted(object arg) { if ((this.LoanRequestSendToReplyToCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.LoanRequestSendToReplyToCompleted(this, new LoanRequestSendToReplyToCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnDeleteLinkedinAccountOperationCompleted(object arg) { if ((this.DeleteLinkedinAccountCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteLinkedinAccountCompleted(this, new DeleteLinkedinAccountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnGetRawFtpAccountsPagedOperationCompleted(object arg) { if ((this.GetRawFtpAccountsPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawFtpAccountsPagedCompleted(this, new GetRawFtpAccountsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OngetAllFacebookFeedsByUserIdAndProfileId1WithRangeOperationCompleted(object arg) { if ((this.getAllFacebookFeedsByUserIdAndProfileId1WithRangeCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.getAllFacebookFeedsByUserIdAndProfileId1WithRangeCompleted(this, new getAllFacebookFeedsByUserIdAndProfileId1WithRangeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnlookupTerminalClaimStatusOperationCompleted(object arg) { if ((this.lookupTerminalClaimStatusCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.lookupTerminalClaimStatusCompleted(this, new lookupTerminalClaimStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OngetParameterDetailsOperationCompleted(object arg) { if ((this.getParameterDetailsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.getParameterDetailsCompleted(this, new getParameterDetailsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
protected void InvokeAsync(string methodName, string requestUrl, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) { userState = base.NullToken; } AsyncOperation userAsyncState = AsyncOperationManager.CreateOperation(new UserToken(callback, userState)); WebClientAsyncResult result = new WebClientAsyncResult(this, null, null, new AsyncCallback(this.InvokeAsyncCallback), userAsyncState); try { base.AsyncInvokes.Add(userState, result); } catch (Exception exception) { if (((exception is ThreadAbortException) || (exception is StackOverflowException)) || (exception is OutOfMemoryException)) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Error, this, "InvokeAsync", exception); } Exception exception2 = new ArgumentException(Res.GetString("AsyncDuplicateUserState"), exception); object[] results = new object[1]; InvokeCompletedEventArgs arg = new InvokeCompletedEventArgs(results, exception2, false, userState); userAsyncState.PostOperationCompleted(callback, arg); return; } try { HttpClientMethod clientMethod = this.GetClientMethod(methodName); MimeParameterWriter parameterWriter = this.GetParameterWriter(clientMethod); Uri requestUri = new Uri(requestUrl); if (parameterWriter != null) { parameterWriter.RequestEncoding = base.RequestEncoding; requestUrl = parameterWriter.GetRequestUrl(requestUri.AbsoluteUri, parameters); requestUri = new Uri(requestUrl, true); } result.InternalAsyncState = new InvokeAsyncState(clientMethod, parameterWriter, parameters); base.BeginSend(requestUri, result, parameterWriter.UsesWriteRequest); } catch (Exception exception3) { if (((exception3 is ThreadAbortException) || (exception3 is StackOverflowException)) || (exception3 is OutOfMemoryException)) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Error, this, "InvokeAsync", exception3); } object[] objArray2 = new object[1]; base.OperationCompleted(userState, objArray2, exception3, false); } }
/// <include file='doc\HttpClientProtocol.uex' path='docs/doc[@for="HttpSimpleClientProtocol.InvokeAsync1"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected void InvokeAsync(string methodName, string requestUrl, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) { userState = NullToken; } AsyncOperation asyncOp = AsyncOperationManager.CreateOperation(new UserToken(callback, userState)); WebClientAsyncResult asyncResult = new WebClientAsyncResult(this, null, null, new AsyncCallback(InvokeAsyncCallback), asyncOp); try { AsyncInvokes.Add(userState, asyncResult); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Error, this, "InvokeAsync", e); } Exception exception = new ArgumentException(Res.GetString(Res.AsyncDuplicateUserState), e); InvokeCompletedEventArgs eventArgs = new InvokeCompletedEventArgs(new object[] { null }, exception, false, userState); asyncOp.PostOperationCompleted(callback, eventArgs); return; } try { HttpClientMethod method = GetClientMethod(methodName); MimeParameterWriter paramWriter = GetParameterWriter(method); Uri requestUri = new Uri(requestUrl); if (paramWriter != null) { paramWriter.RequestEncoding = RequestEncoding; requestUrl = paramWriter.GetRequestUrl(requestUri.AbsoluteUri, parameters); requestUri = new Uri(requestUrl, true); } asyncResult.InternalAsyncState = new InvokeAsyncState(method, paramWriter, parameters); BeginSend(requestUri, asyncResult, paramWriter.UsesWriteRequest); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Error, this, "InvokeAsync", e); } OperationCompleted(userState, new object[] { null }, e, false); } }
protected void InvokeAsync(string methodName, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) { userState = this.NullToken; } SoapHttpClientProtocol.InvokeAsyncState invokeAsyncState = new SoapHttpClientProtocol.InvokeAsyncState(methodName, parameters); AsyncOperation operation = AsyncOperationManager.CreateOperation((object)new UserToken(callback, userState)); WebClientAsyncResult asyncResult = new WebClientAsyncResult((WebClientProtocol)this, (object)invokeAsyncState, (WebRequest)null, new AsyncCallback(this.InvokeAsyncCallback), (object)operation); try { this.AsyncInvokes.Add(userState, (object)asyncResult); } catch (Exception ex) { if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException) { throw; } else { if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Warning, (object)this, "InvokeAsync", ex); } InvokeCompletedEventArgs completedEventArgs = new InvokeCompletedEventArgs(new object[1], (Exception) new ArgumentException(System.Web.Services.Res.GetString("AsyncDuplicateUserState"), ex), false, userState); operation.PostOperationCompleted(callback, (object)completedEventArgs); return; } } try { this.BeginSend(this.Uri, asyncResult, true); } catch (Exception ex) { if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException) { throw; } else { if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Warning, (object)this, "InvokeAsync", ex); } this.OperationCompleted(userState, new object[1], ex, false); } } }
internal WebClientAsyncResult OperationCompleted(object userState, object[] parameters, Exception e, bool canceled) { WebClientAsyncResult result = (WebClientAsyncResult)base.AsyncInvokes[userState]; if (result != null) { AsyncOperation asyncState = (AsyncOperation)result.AsyncState; UserToken userSuppliedState = (UserToken)asyncState.UserSuppliedState; InvokeCompletedEventArgs arg = new InvokeCompletedEventArgs(parameters, e, canceled, userState); base.AsyncInvokes.Remove(userState); asyncState.PostOperationCompleted(userSuppliedState.Callback, arg); } return(result); }
void InvokeAsyncCallback(IAsyncResult ar) { InvokeAsyncInfo info = (InvokeAsyncInfo)ar.AsyncState; SimpleWebClientAsyncResult sar = (SimpleWebClientAsyncResult)ar; InvokeCompletedEventArgs args = new InvokeCompletedEventArgs(sar.Exception, false, info.UserState, (object[])sar.Result); if (info.Context != null) { info.Context.Send(info.Callback, args); } else { info.Callback(args); } }
internal WebClientAsyncResult OperationCompleted(object userState, object[] parameters, Exception e, bool canceled) { Debug.Assert(userState != null, "We should not call OperationCompleted with null user token."); WebClientAsyncResult result = (WebClientAsyncResult)AsyncInvokes[userState]; if (result != null) { AsyncOperation asyncOp = (AsyncOperation)result.AsyncState; UserToken token = (UserToken)asyncOp.UserSuppliedState; InvokeCompletedEventArgs eventArgs = new InvokeCompletedEventArgs(parameters, e, canceled, userState); AsyncInvokes.Remove(userState); asyncOp.PostOperationCompleted(token.Callback, eventArgs); } return(result); }
protected void InvokeAsync(string methodName, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) { userState = base.NullToken; } InvokeAsyncState internalAsyncState = new InvokeAsyncState(methodName, parameters); AsyncOperation userAsyncState = AsyncOperationManager.CreateOperation(new UserToken(callback, userState)); WebClientAsyncResult result = new WebClientAsyncResult(this, internalAsyncState, null, new AsyncCallback(this.InvokeAsyncCallback), userAsyncState); try { base.AsyncInvokes.Add(userState, result); } catch (Exception exception) { if (((exception is ThreadAbortException) || (exception is StackOverflowException)) || (exception is OutOfMemoryException)) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Warning, this, "InvokeAsync", exception); } Exception exception2 = new ArgumentException(System.Web.Services.Res.GetString("AsyncDuplicateUserState"), exception); object[] results = new object[1]; InvokeCompletedEventArgs arg = new InvokeCompletedEventArgs(results, exception2, false, userState); userAsyncState.PostOperationCompleted(callback, arg); return; } try { base.BeginSend(base.Uri, result, true); } catch (Exception exception3) { if (((exception3 is ThreadAbortException) || (exception3 is StackOverflowException)) || (exception3 is OutOfMemoryException)) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Warning, this, "InvokeAsync", exception3); } object[] objArray2 = new object[1]; base.OperationCompleted(userState, objArray2, exception3, false); } }
/// <include file='doc\SoapClientProtocol.uex' path='docs/doc[@for="SoapClientProtocol.InvokeAsync1"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected void InvokeAsync(string methodName, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) { userState = NullToken; } InvokeAsyncState invokeState = new InvokeAsyncState(methodName, parameters); AsyncOperation asyncOp = AsyncOperationManager.CreateOperation(new UserToken(callback, userState)); WebClientAsyncResult asyncResult = new WebClientAsyncResult(this, invokeState, null, new AsyncCallback(InvokeAsyncCallback), asyncOp); try { AsyncInvokes.Add(userState, asyncResult); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Warning, this, "InvokeAsync", e); } Exception exception = new ArgumentException(Res.GetString(Res.AsyncDuplicateUserState), e); InvokeCompletedEventArgs eventArgs = new InvokeCompletedEventArgs(new object[] { null }, exception, false, userState); asyncOp.PostOperationCompleted(callback, eventArgs); return; } try { BeginSend(Uri, asyncResult, true); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) { throw; } if (Tracing.On) { Tracing.ExceptionCatch(TraceEventType.Warning, this, "InvokeAsync", e); } OperationCompleted(userState, new object[] { null }, e, false); } }
/// <include file='doc\HttpClientProtocol.uex' path='docs/doc[@for="HttpSimpleClientProtocol.InvokeAsync1"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected void InvokeAsync(string methodName, string requestUrl, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) userState = NullToken; AsyncOperation asyncOp = AsyncOperationManager.CreateOperation(new UserToken(callback, userState)); WebClientAsyncResult asyncResult = new WebClientAsyncResult(this, null, null, new AsyncCallback(InvokeAsyncCallback), asyncOp); try { AsyncInvokes.Add(userState, asyncResult); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) throw; if (Tracing.On) Tracing.ExceptionCatch(TraceEventType.Error, this, "InvokeAsync", e); Exception exception = new ArgumentException(Res.GetString(Res.AsyncDuplicateUserState), e); InvokeCompletedEventArgs eventArgs = new InvokeCompletedEventArgs(new object[] { null }, exception, false, userState); asyncOp.PostOperationCompleted(callback, eventArgs); return; } try { HttpClientMethod method = GetClientMethod(methodName); MimeParameterWriter paramWriter = GetParameterWriter(method); Uri requestUri = new Uri(requestUrl); if (paramWriter != null) { paramWriter.RequestEncoding = RequestEncoding; requestUrl = paramWriter.GetRequestUrl(requestUri.AbsoluteUri, parameters); requestUri = new Uri(requestUrl, true); } asyncResult.InternalAsyncState = new InvokeAsyncState(method, paramWriter, parameters); BeginSend(requestUri, asyncResult, paramWriter.UsesWriteRequest); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) throw; if (Tracing.On) Tracing.ExceptionCatch(TraceEventType.Error, this, "InvokeAsync", e); OperationCompleted(userState, new object[] { null }, e, false); } }
void InvokeAsyncCallback (IAsyncResult ar) { InvokeAsyncInfo info = (InvokeAsyncInfo) ar.AsyncState; SoapWebClientAsyncResult sar = (SoapWebClientAsyncResult) ar; InvokeCompletedEventArgs args = new InvokeCompletedEventArgs (sar.Exception, false, info.UserState, (object[]) sar.Result); if (info.Context != null) info.Context.SendOrPost (info.Callback, args); else info.Callback (args); }
private void OnGet_Obtener_Niveles_ClienteOperationCompleted(object arg) { if ((this.Get_Obtener_Niveles_ClienteCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.Get_Obtener_Niveles_ClienteCompleted(this, new Get_Obtener_Niveles_ClienteCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
/// <include file='doc\SoapClientProtocol.uex' path='docs/doc[@for="SoapClientProtocol.InvokeAsync1"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected void InvokeAsync(string methodName, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) userState = NullToken; InvokeAsyncState invokeState = new InvokeAsyncState(methodName, parameters); AsyncOperation asyncOp = AsyncOperationManager.CreateOperation(new UserToken(callback, userState)); WebClientAsyncResult asyncResult = new WebClientAsyncResult(this, invokeState, null, new AsyncCallback(InvokeAsyncCallback), asyncOp); try { AsyncInvokes.Add(userState, asyncResult); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) throw; if (Tracing.On) Tracing.ExceptionCatch(TraceEventType.Warning, this, "InvokeAsync", e); Exception exception = new ArgumentException(Res.GetString(Res.AsyncDuplicateUserState), e); InvokeCompletedEventArgs eventArgs = new InvokeCompletedEventArgs(new object[] { null }, exception, false, userState); asyncOp.PostOperationCompleted(callback, eventArgs); return; } try { BeginSend(Uri, asyncResult, true); } catch (Exception e) { if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) throw; if (Tracing.On) Tracing.ExceptionCatch(TraceEventType.Warning, this, "InvokeAsync", e); OperationCompleted(userState, new object[] { null }, e, false); } }
internal WebClientAsyncResult OperationCompleted(object userState, object[] parameters, Exception e, bool canceled) { Debug.Assert(userState != null, "We should not call OperationCompleted with null user token."); WebClientAsyncResult result = (WebClientAsyncResult)AsyncInvokes[userState]; if (result != null) { AsyncOperation asyncOp = (AsyncOperation)result.AsyncState; UserToken token = (UserToken)asyncOp.UserSuppliedState; InvokeCompletedEventArgs eventArgs = new InvokeCompletedEventArgs(parameters, e, canceled, userState); AsyncInvokes.Remove(userState); asyncOp.PostOperationCompleted(token.Callback, eventArgs); } return result; }
private void OnallCardTransactionInMonthOperationCompleted(object arg) { if ((this.allCardTransactionInMonthCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.allCardTransactionInMonthCompleted(this, new allCardTransactionInMonthCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
private void OnCalcPrecoPrazoRestricaoOperationCompleted(object arg) { if ((this.CalcPrecoPrazoRestricaoCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CalcPrecoPrazoRestricaoCompleted(this, new CalcPrecoPrazoRestricaoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } }
protected void InvokeAsync(string methodName, object[] parameters, SendOrPostCallback callback, object userState) { if (userState == null) userState = this.NullToken; SoapHttpClientProtocol.InvokeAsyncState invokeAsyncState = new SoapHttpClientProtocol.InvokeAsyncState(methodName, parameters); AsyncOperation operation = AsyncOperationManager.CreateOperation((object) new UserToken(callback, userState)); WebClientAsyncResult asyncResult = new WebClientAsyncResult((WebClientProtocol) this, (object) invokeAsyncState, (WebRequest) null, new AsyncCallback(this.InvokeAsyncCallback), (object) operation); try { this.AsyncInvokes.Add(userState, (object) asyncResult); } catch (Exception ex) { if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException) { throw; } else { if (Tracing.On) Tracing.ExceptionCatch(TraceEventType.Warning, (object) this, "InvokeAsync", ex); InvokeCompletedEventArgs completedEventArgs = new InvokeCompletedEventArgs(new object[1], (Exception) new ArgumentException(System.Web.Services.Res.GetString("AsyncDuplicateUserState"), ex), false, userState); operation.PostOperationCompleted(callback, (object) completedEventArgs); return; } } try { this.BeginSend(this.Uri, asyncResult, true); } catch (Exception ex) { if (ex is ThreadAbortException || ex is StackOverflowException || ex is OutOfMemoryException) { throw; } else { if (Tracing.On) Tracing.ExceptionCatch(TraceEventType.Warning, (object) this, "InvokeAsync", ex); this.OperationCompleted(userState, new object[1], ex, false); } } }
internal WebClientAsyncResult OperationCompleted(object userState, object[] parameters, Exception e, bool canceled) { WebClientAsyncResult result = (WebClientAsyncResult) base.AsyncInvokes[userState]; if (result != null) { AsyncOperation asyncState = (AsyncOperation) result.AsyncState; UserToken userSuppliedState = (UserToken) asyncState.UserSuppliedState; InvokeCompletedEventArgs arg = new InvokeCompletedEventArgs(parameters, e, canceled, userState); base.AsyncInvokes.Remove(userState); asyncState.PostOperationCompleted(userSuppliedState.Callback, arg); } return result; }