// Add the discount code to the checkout and update the order summary when the request completes. private void SetDiscountCode(string discountCode) { ShowLoadingDialog(Resource.String.syncing_data); SampleApplication.SetDiscountCode(discountCode, delegate { DismissLoadingDialog(); UpdateOrderSummary(); }, delegate { DismissLoadingDialog(); Toast.MakeText(this, GetString(Resource.String.discount_error, discountCode), ToastLength.Long).Show(); }); }