public Permission?ResolveMethodPermission(MethodInfo methodInfo, object context, params Type[] genericArguments) { return(RuleMaps.Aggregate((Permission?)null, (result, ruleMap) => { if (result == null && ruleMap == null) { return null; } return result ?? Permission.None | (ruleMap.ResolveMethodPermission(methodInfo, context, genericArguments) ?? Permission.None); })); }
public Permission?ResolveTypePermission(object context) { return(RuleMaps.Aggregate((Permission?)null, (result, ruleMap) => { if (result == null && ruleMap == null) { return null; } return result ?? Permission.None | (ruleMap.ResolveTypePermission(context) ?? Permission.None); })); }
public bool ShouldFilterForProperty(PropertyInfo propertyInfo, object context) { return(RuleMaps.Aggregate(true, (result, ruleMap) => result && ruleMap.ShouldFilterForProperty(propertyInfo, context))); }
public bool ShouldFilterForMethod(MethodInfo methodInfo, object context, Type[] genericArguments) { return(RuleMaps.Aggregate(true, (result, ruleMap) => result && ruleMap.ShouldFilterForMethod(methodInfo, context, genericArguments))); }
public bool HasAnyInstancePropertyPermissionResolverExpression(PropertyInfo propertyInfo, object key) { return(RuleMaps.Aggregate(false, (result, ruleMap) => result || ruleMap.HasAnyInstancePropertyPermissionResolverExpression(propertyInfo, key))); }