Example #1
0
 public bool CheckPolicy(ShoppingCart cart, Guid productGuid, int quantity, BaseUser user, IUnitOfWork unitOfWork)
 {
     foreach (PropertyInfo property in user.GetType().GetProperties())
     {
         if (property.Name == FieldName)
         {
             return(ExpectedValue.Equals(property.GetValue(user)) ? true : false);
         }
     }
     return(false);
 }