public void Or(params Action <IOrOptions <T> >[] orClauses)
        {
            var orOptions = new OrOptions <T>();

            foreach (var clause in orClauses)
            {
                clause(orOptions);
            }
            _wheres.Add(orOptions.BuildOut());
        }
Ejemplo n.º 2
0
        public void Or(Action <IOrOptions <T> >[] orOperations)
        {
            var orOptions = new OrOptions <T>();

            foreach (var orOperation in orOperations)
            {
                orOperation(orOptions);
            }
            var compile = orOptions.BuildOut().Compile();
            var canView = false;

            try
            {
                canView = compile.Invoke(_domainEntity);
            }
            catch (NullReferenceException) { }
            finally
            {
                setCanView(canView);
            }
        }