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

            PublishEvent(ScreenEvents.RequestClose, args);
            return(args.IsCloseAllowed);
        }
Example #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);
            }
        }
Example #3
0
 private void HandleRequestClose(RequestCloseEventArgs args)
 {
     args.IsCloseAllowed = _screens
                           .All(s => GetLifecycleOps(s).RequestClose());
 }