public bool RequestClose()
        {
            RequestCloseEventArgs args = new RequestCloseEventArgs(_target);

            PublishEvent(ScreenEvents.RequestClose, args);
            return(args.IsCloseAllowed);
        }
Esempio n. 2
0
        private void ExecuteRequestCloseHandlers(EventPublication publication)
        {
            foreach (var registration in GetSubscriptionsFor(publication))
            {
                RequestCloseEventArgs args = (RequestCloseEventArgs)publication.Payload;

                if (!args.IsCloseAllowed)
                {
                    break;
                }

                registration.Invoke(publication);
            }
        }
Esempio n. 3
0
 private void HandleRequestClose(RequestCloseEventArgs args)
 {
     args.IsCloseAllowed = _screens
                           .All(s => GetLifecycleOps(s).RequestClose());
 }