Exemple #1
0
        public void UpdateCompentence(CompetenceUpdateCommand command)
        {
            var parser = new UserCompetenceParser();

            command.Competencies = parser.ParseCompetenceText(command.CompentenceText);
            command.UserId       = GetId();
            state.Apply(command);
            userCompentencePersister.Store(this, command);
        }
Exemple #2
0
        public void UserCompetenceChange(CompetenceUpdateCommand command)
        {
            string userId  = command.UserId;
            var    factory = Factory.GetSynonyms();

            lock (syncRoot)
            {
                ClearUserCompetencies(userId);
                foreach (var competency in command.Competencies)
                {
                    var           competencySynonym = factory.FindCoreSynonym(competency);
                    List <string> list;
                    if (userCompetencies.TryGetValue(competencySynonym, out list) == false)
                    {
                        list = new List <string>();
                        userCompetencies[competencySynonym] = list;
                    }

                    list.Add(userId);
                }
            }
        }
Exemple #3
0
 public void Apply(CompetenceUpdateCommand command)
 {
     compentenceText = command.CompentenceText;
 }