public virtual bool EhValido()
        {
            if (this._regra.ObterRegras().Count().Equals(0))
            {
                FiltrarEscp escopo = new FiltrarEscp();
                this._regra.AdicionarRegra(escopo.CursooEhValido <FiltrarCmd>(x => x.Cursos));
                this._regra.AdicionarRegra(escopo.StatusEhValido <FiltrarCmd>(x => x.Status));
            }

            this.Notificacoes = this._regra.Validar(this);
            return(this.Notificacoes.EhValido());
        }
Esempio n. 2
0
 public bool EhValido()
 {
     if (this._regras.ObterRegras().Count().Equals(0))
     {
         FiltrarEscp escopo = new FiltrarEscp();
         this._regras.AdicionarRegra(escopo.LoggerEhValido <FiltrarCmd>(x => x.Logs));
         this._regras.AdicionarRegra(escopo.UsuarioEhValido <FiltrarCmd>(x => x.Usuarios));
         this._regras.AdicionarRegra(escopo.RastreioEhValido <FiltrarCmd>(x => x.Rastreios));
         this._regras.AdicionarRegra(escopo.NivelLoggerEhValido <FiltrarCmd>(x => x.Niveis));
     }
     this.Notificacoes = this._regras.Validar(this);
     return(this.Notificacoes.EhValido());
 }