Example #1
0
 private RetrievePolicyContext GetPolicyContext(IProtectableObject model)
 {
     return(new RetrievePolicyContext()
     {
         Entity = model,
         EntityRowKey = _kernel.EntityKeyProvider.GetKey(model),
         EntityTypeName = model.GetType().Name
     });
 }
 private ModifyPolicyContext GetPolicyContext(IProtectableObject model, AccessTypes accessType)
 {
     return(new ModifyPolicyContext()
     {
         AccessType = accessType,
         Entity = model,
         EntityRowKey = _kernel.EntityKeyProvider.GetKey(model),
         EntityTypeName = model.GetType().Name,
         ModifiedProperties = { "Property1" }
     });
 }