Exemple #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);
            }
        }
Exemple #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);
                }
            });
        }