public void Simple()
 {
     var service = new DeleteRegistrationService
                       {
                           RequestBuilder = ServerRequestBuilder.Instance
                       };
     var request = new DeleteRegistrationRequest {PushId = "AndroidPushId"};
     service.Execute(request, response => Debug.WriteLine("Deleted"), ExceptionHandler.Handle);
 }
        public void Execute(DeleteRegistrationRequest request, Action<DeleteRegistrationResponse> responseCallback, Action<Exception> exceptionCallback)
        {
            //TODO: validate args
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/apids/" + request.PushId);
            webRequest.Method = "Delete";

            var asyncRequest = new AsyncRequest
            {
                Request = webRequest,
                ReadFromResponse = o => responseCallback(new DeleteRegistrationResponse()),
                ExceptionCallback = exceptionCallback,
                RequestContentType = "application/json"
            };
            asyncRequest.Execute();
        }
        public void Execute(DeleteRegistrationRequest request, Action <DeleteRegistrationResponse> responseCallback, Action <Exception> exceptionCallback)
        {
            //TODO: validate args
            var webRequest = RequestBuilder.Build("https://go.urbanairship.com/api/apids/" + request.PushId);

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

            var asyncRequest = new AsyncRequest
            {
                Request           = webRequest,
                ReadFromResponse  = o => responseCallback(new DeleteRegistrationResponse()),
                ExceptionCallback = exceptionCallback,
            };

            asyncRequest.Execute();
        }