public ErrorViewModel(Exception ex, IVtmLogger logger, EErrorButtons buttonSet)
     : this(buttonSet) {
     if (logger != null)
     {
         logger.Error(ex);
     }
 }
Beispiel #2
0
        protected async Task <EErrorResult> RaiseError(string title, string message, EErrorButtons buttonSet, Exception ex)
        {
            var error = ErrorViewModelFactory.GetInstance(title, message, buttonSet, this, ex);

            RaiseErrorEvent(error);
            var result = await _raiseError();

            ClearErrorEvent();
            return(result);
        }
        public static ErrorViewModel GetInstance(string title, string message, EErrorButtons buttonSet, IObserver<EErrorResult> observer, Exception ex)
        {
            ErrorViewModel evm = new ErrorViewModel(ex, _logger, buttonSet);
            evm.Title = title;
            evm.Message = message;
            evm.ButtonSet = buttonSet;
            evm.Subscribe(observer);

            return evm;
        }
        public static ErrorViewModel GetInstance(string title, string message, EErrorButtons buttonSet, IObserver <EErrorResult> observer, Exception ex)
        {
            ErrorViewModel evm = new ErrorViewModel(ex, _logger, buttonSet);

            evm.Title     = title;
            evm.Message   = message;
            evm.ButtonSet = buttonSet;
            evm.Subscribe(observer);

            return(evm);
        }
 public ErrorViewModel(EErrorButtons buttonSet)
     : base()
 {
     Visible    = true;
     _buttonSet = buttonSet;
 }
 public ErrorViewModel()
     : base()
 {
     Visible    = false;
     _buttonSet = EErrorButtons.Empty;
 }