public bool RequestClose() { RequestCloseEventArgs args = new RequestCloseEventArgs(_target); PublishEvent(ScreenEvents.RequestClose, args); return(args.IsCloseAllowed); }
private void ExecuteRequestCloseHandlers(EventPublication publication) { foreach (var registration in GetSubscriptionsFor(publication)) { RequestCloseEventArgs args = (RequestCloseEventArgs)publication.Payload; if (!args.IsCloseAllowed) { break; } registration.Invoke(publication); } }
private void HandleRequestClose(RequestCloseEventArgs args) { args.IsCloseAllowed = _screens .All(s => GetLifecycleOps(s).RequestClose()); }