Ejemplo n.º 1
0
        public async Task <bool> Can <T>(Func <T, object> del) where T : IPolicy
        {
            var policy = GetPolicy <T>();
            var before = await policy.Before();

            if (before != null)
            {
                return((bool)before);
            }
            return(await Utils.ExtractRefTask <bool>(del(policy)));
        }
Ejemplo n.º 2
0
 public async Task <IQueryable <TQueriable> > ScopeAsync <TPolicy, TQueriable>(params object[] args) where TPolicy : IPolicy
 {
     return(await Utils.ExtractRefTask <IQueryable <TQueriable> >(
                Utils.CallMethod(GetPolicyOrRaise <TPolicy>(), "ScopeAsync", args)
                ));
 }