public static void AsyncCompleteNoBusy(this AsyncCompletedEventArgs e, Action resultMethod = null, Action errorMethod = null, bool showErrorMsg = true) { if (e.Error == null) { if (resultMethod != null) { resultMethod(); } } else { WcfHelper.ShowError(e, errorMethod, showErrorMsg); } }
public static void AsyncComplete(this AsyncCompletedEventArgs e, Action resultMethod = null, Action errorMethod = null, bool showErrorMsg = true) { if (e.Error == null) { //Deployment.Current.Dispatcher.BeginInvoke(() => //{ // Deployment.Current.Dispatcher.BeginInvoke(() => // { // BusyIndicatorService.Instance.IsBusy = false; // }); //}); if (resultMethod != null) { resultMethod(); } } else { //BusyIndicatorService.Instance.IsBusy = false; WcfHelper.ShowError(e, errorMethod, showErrorMsg); } }