Exemple #1
0
        public ShowDialogResponderResultSetup EnqueueShowDialogResponder(DialogScreenResult result)
        {
            var resp = new ShowDialogResponderResultSetup(DialogServiceMethod.OpenDialog, result);

            _responders.Enqueue(resp);
            return(resp);
        }
 internal virtual bool ProcessScreenDialogInvocationCore <TScreen>(
     DialogServiceInvocation invocation,
     IScreenFactory <TScreen> screen,
     out DialogScreenResult result
     ) where TScreen : IScreenBase
 {
     result = null;
     return(false);
 }
Exemple #3
0
        public void ShowDialog_ReturnsEnqueuedDialogResultAndDoesNotCreateScreen()
        {
            var expectedResult = new DialogScreenResult(true);

            Service.EnqueueShowDialogResponder(expectedResult);

            IDialogService svc          = Service;
            var            actualResult = svc.ShowDialog(new TestScreenFactory());

            Assert.AreSame(expectedResult, actualResult);
        }
Exemple #4
0
        internal override bool ProcessScreenDialogInvocationCore <T>(
            DialogServiceInvocation invocation,
            IScreenFactory <T> screen,
            out DialogScreenResult result
            )
        {
            result = null;

            bool match =
                ExpectedInvocation.Method == invocation.Method &&
                ExpectedInvocation.Caption.Matches(invocation.Caption) &&
                ExpectedInvocation.Parent.Matches(invocation.Parent);

            if (match)
            {
                result = ProcessInvocation(invocation, screen);
            }

            return(match);
        }
Exemple #5
0
 internal ShowDialogResponderResultSetup(DialogServiceMethod method, DialogScreenResult dialogResult)
     : base(method)
 {
     _dialogResult = dialogResult;
 }