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 });
        }
Exemple #2
0
        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;
 }
Exemple #4
0
 public OAuthResponseObject(RestResponseHash rrhResponse, OAuthCredentials oaCredentials)
 {
     m_rrhResponse   = rrhResponse;
     m_oaCredentials = oaCredentials;
 }