Exemplo n.º 1
0
        public IResult SetWords(string[] words)
        {
            if (words == null)
            {
                return(new UpdateResult(false, Messages.WordsAreNull));
            }

            var res = _repository.TrySetWords(words.Where(w => !string.IsNullOrEmpty(w)));

            return(new UpdateResult(res, res ? Messages.DictionaryWasUpdated : Messages.FailedToUpdate));
        }