private void ExecuteElevateBlock(SelectableProduct p) { Task e = CoApp.Elevate(); e.ContinueOnFail(ex => { if (ex.InnerException != null) Logger.Warning("Elevate failed {0}, {1}", ex.InnerException.Message, ex.InnerException.StackTrace); else Logger.Warning("Elevate failed {0}, {1}", ex.Message, ex.StackTrace); Messenger.Default.Send(NotEnoughPermissions()); }); e.Continue(() => Block.Execute(p)); }
private void ExecuteBlock(SelectableProduct p) { var t = _updateService.BlockProduct(p.Product); t.ContinueOnFail(e => { Logger.Error(e); if (e is RequiresPermissionException || (e.InnerException != null && e.InnerException is RequiresPermissionException)) { Messenger.Default.Send(NotEnoughPermissions()); } Messenger.Default.Send(ProductStillBlocked()); }); }