Ejemplo n.º 1
0
 private void WithHammockImpl(IRestClient restClient, RestRequest request, Action <TwitterResponse> action)
 {
     restClient.BeginRequest(
         request, new Action <RestRequest, TwitterResponse, object>((req, response, state) =>
     {
         if (response == null)
         {
             return;
         }
         action.Invoke(response);
     }));
 }
Ejemplo n.º 2
0
 private void WithHammockImpl <T>(IRestClient restClient, RestRequest request, Action <T, TwitterResponse> action) where T : class
 {
     restClient.BeginRequest(
         request, new RestCallback <T>((req, response, state) =>
     {
         if (response == null)
         {
             return;
         }
         var entity = response.ContentEntity;
         action.Invoke(entity, new TwitterResponse(response));
     }));
 }