예제 #1
0
        internal void OnError(Args.ErrorEventArgs e)
        {
            var handler = Error;

            if (handler != null)
            {
                handler(this, e);
            }

            var errorCommand = ErrorCommand;

            if (errorCommand != null && errorCommand.CanExecute(e))
            {
                errorCommand.Execute(e);
            }
        }
예제 #2
0
        internal async void OnError(Args.ErrorEventArgs e)
        {
            await MainThreadDispatcher.Instance.PostAsync(() =>
            {
                var handler = Error;
                if (handler != null)
                {
                    handler(this, e);
                }

                var errorCommand = ErrorCommand;
                if (errorCommand != null && errorCommand.CanExecute(e))
                {
                    errorCommand.Execute(e);
                }
            });
        }