private void DoRequestCallback(RestRequest rrqRequest, RestResponse rrsResponse, object objUserState) { RestResponseHash rrhResponse = new RestResponseHash(rrsResponse); APIReturn aprReturn = (APIReturn)objUserState; OAuthCredentials oaCredentials = (OAuthCredentials)aprReturn.CallbackArg; string sErrorMessage = ""; if (rrsResponse.InnerException != null) sErrorMessage = rrsResponse.InnerException.Message; APICallbackArgs acArgs = new APICallbackArgs(rrsResponse.StatusCode == HttpStatusCode.OK, sErrorMessage, new OAuthResponseObject(rrhResponse, oaCredentials)); aprReturn.SynchronizeInvoke(new object[] { acArgs }); }
private void DoRequestCallback(RestRequest rrqRequest, RestResponse rrsResponse, object objUserState) { RestResponseHash rrhResponse = new RestResponseHash(rrsResponse); APIReturn aprReturn = (APIReturn)objUserState; OAuthCredentials oaCredentials = (OAuthCredentials)aprReturn.CallbackArg; string sErrorMessage = ""; if (rrsResponse.InnerException != null) { sErrorMessage = rrsResponse.InnerException.Message; } APICallbackArgs acArgs = new APICallbackArgs(rrsResponse.StatusCode == HttpStatusCode.OK, sErrorMessage, new OAuthResponseObject(rrhResponse, oaCredentials)); aprReturn.SynchronizeInvoke(new object[] { acArgs }); }
public OAuthResponseObject(RestResponseHash rrhResponse, OAuthCredentials oaCredentials) { m_rrhResponse = rrhResponse; m_oaCredentials = oaCredentials; }