예제 #1
0
            public PolicyFilter(IPolicyApiFilter policyFilter, Func <IAuthorizationPolicyStore> policyStoreFactory)
            {
                if (policyStoreFactory == null)
                {
                    throw new ArgumentNullException(nameof(policyStoreFactory));
                }
                if (policyFilter == null)
                {
                    throw new ArgumentNullException(nameof(policyFilter));
                }

                _policyStoreFactory = policyStoreFactory;
                _policyFilter       = policyFilter;
            }
예제 #2
0
 public ApiFilterWrapper(IPolicyApiFilter policyFilter, Func <IAuthorizationPolicyStore> policyStoreFactory)
 {
     ApiFilter = new PolicyFilter(policyFilter, policyStoreFactory);
 }