コード例 #1
0
        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());
 }