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

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