public virtual IBadgeStrategy GetBadgeStrategy(BadgeType badgeType)
        {
            if (!this.availableStrategies.ContainsKey(badgeType.Code))
            {
                throw new ArgumentException("Badge type not supported", badgeType.Code);
            }

            return this.availableStrategies[badgeType.Code];
        }
 protected void CalculateMinThresholdedBadge(User user, int value, BadgeType badgeType)
 {
     var badges = badgeType.Badges.Where(e => e.Min < value).ToList();
     foreach (var badge in badges)
     {
         if (badge != null)
         {
             if (!user.Badges.Any(e => e.Badge.Id == badge.Id))
             {
                 user.Badges.Add(new UserBadge { Badge = badge, ReceivedDate = DateTime.UtcNow });
             }
         }
     }
 }