/// <summary> /// Asynchronously starts sending a request /// </summary> /// <param name="message">Request message</param> /// <param name="callback">The asynchronous callback</param> /// <returns>Returns an IAsyncResult object</returns> public IAsyncResult BeginGetResponse(OiosiMessage message, out Response response, AsyncCallback callback) { AsyncGetResponse asyncGetResponse = new AsyncGetResponse(GetResponse); IAsyncResult result = asyncGetResponse.BeginInvoke(message, out response, callback, asyncGetResponse); return(result); }
/// <include file='doc\filewebrequest.uex' path='docs/doc[@for="FileWebRequest.BeginGetResponse"]/*' /> public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state) { GlobalLog.Enter("FileWebRequest::BeginGetResponse"); lock (this) { if (m_readPending) { Exception e = new InvalidOperationException(SR.GetString(SR.net_repcall)); GlobalLog.LeaveException("FileWebRequest::BeginGetResponse", e); throw e; } m_readPending = true; } m_GetResponseDelegate = new AsyncGetResponse(InternalGetResponse); GlobalLog.Leave("FileWebRequest::BeginGetResponse"); return(m_GetResponseDelegate.BeginInvoke(callback, state)); }