public void Simple()
 {
     var service = new GetRegistrationService
         {
             RequestBuilder = ServerRequestBuilder.Instance
         };
     var request = new GetRegistrationRequest {PushId = "AndroidPushId"};
     service.Execute(request, Callback, ExceptionHandler.Handle);
 }
        public void Execute(GetRegistrationRequest request, Action<GetRegistrationResponse> responseCallback, Action<Exception> exceptionCallback)
        {
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/apids/" + request.PushId);
            webRequest.Method = "Get";
            webRequest.ContentType = "application/json";

            var asyncRequest = new AsyncRequest
            {
                Request = webRequest,
                ReadFromResponse = stream => responseCallback(GetRegistrationResponseDeSerializer.DeSerialize(stream)),
                ExceptionCallback = exceptionCallback,
            };
            asyncRequest.Execute();
        }
 public void Simple()
 {
     var service = new GetRegistrationService
                       {
                           RequestBuilder = RequestBuilderHelper.Build()
                       };
     var helper = new AsyncTestHelper<GetRegistrationResponse>();
     var request = new GetRegistrationRequest
                       {
                           PushId = RemoteSettings.AndroidPushId
                       };
     service.Execute(request, helper.Callback, helper.HandleException);
     helper.Wait();
 }
        public void Execute(GetRegistrationRequest request, Action <GetRegistrationResponse> responseCallback, Action <Exception> exceptionCallback)
        {
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/apids/" + request.PushId);

            webRequest.Method      = "Get";
            webRequest.ContentType = "application/json";

            var asyncRequest = new AsyncRequest
            {
                Request           = webRequest,
                ReadFromResponse  = stream => responseCallback(GetRegistrationResponseDeSerializer.DeSerialize(stream)),
                ExceptionCallback = exceptionCallback,
            };

            asyncRequest.Execute();
        }