Esempio n. 1
0
        protected ActionResult CustomResponse(object result = null)
        {
            if (!_notificator.HasNotification())
            {
                return(Ok(new
                {
                    success = true,
                    data = result
                }));
            }

            return(BadRequest(new
            {
                success = false,
                error = _notificator.GetNotifications().Select(n => n.Message)
            }));
        }
Esempio n. 2
0
 protected bool OperacaoValida()
 {
     return(!_notificator.HasNotification());
 }
Esempio n. 3
0
 public bool OperacaoValida()
 {
     return(!_notificator.HasNotification());
 }
 protected bool IsValid() => !_notificator.HasNotification();
Esempio n. 5
0
 protected bool ValidOperation()
 {
     return(!_notificator.HasNotification());
 }
Esempio n. 6
0
 protected bool PossuiNotificacao()
 {
     return(_notificator.HasNotification());
 }
Esempio n. 7
0
 private bool IsValidaOperation()
 {
     return(!_notificator.HasNotification());
 }