Inheritance: MedalRequirementsChecker
 private MedalRequirementsChecker factoryMedalChecker()
 {
     MedalRequirementsChecker returnvalue = null;
     switch (AppName)
     {
         case ApplicationName.Spontaneous:
             returnvalue = new SpontaneousMedalRequirementChecker();
             break;
         case ApplicationName.Plateful:
             returnvalue = new PlatefulMedalRequirementChecker();
             break;
     }
     return returnvalue;
 }
        internal MedalProgress GetClosesMedal()
        {
            var userProfile = GetUserProfile();
            var userData = userProfile.GetUserData();

            if (userData == null)
            {
                log.WarnFormat("[GetClosesMedal] User={0} tried to get GetClosesMedal, but userData doesn't exists.", userProfile.UserName);
                return null;
            }

            MedalProgress returnValue;

            MedalRequirementsChecker medalChecker;
            switch (AppName)
            {
                case ApplicationName.Spontaneous:
                    log.InfoFormat("[GetClosesMedal] Spontaneous : user={0}.", userProfile.UserName);
                    medalChecker = new SpontaneousMedalRequirementChecker();
                    break;
                case ApplicationName.Plateful:
                    log.InfoFormat("[GetClosesMedal] Platefull : user={0}.", userProfile.UserName);
                    medalChecker = new PlatefulMedalRequirementChecker();
                    break;
                case ApplicationName.BackOffice:
                    log.InfoFormat("[GetClosesMedal] BackOffice : user={0}.", userProfile.UserName);
                    return null;
                default:
                    log.InfoFormat("[GetClosesMedal] default : user={0}.", userProfile.UserName);
                    return null;
            }

            returnValue = medalChecker.getClosesMedal(userData);

            //var medals = userData.UserMedalsList;
            log.InfoFormat("[GetClosesMedal] user={0}, MedalProgress = MedalProgress.ToString Function Not implemented.", userProfile.UserName);
            return returnValue;
        }