public UpdateWordCommand(IRepository <Dictionary> dictionaries, IUnitOfWork unitOfWork, IDictionariesFactory dictionaryFactory)
        {
            Guard.WhenArgument(dictionaries, "dictionaries").IsNull().Throw();
            Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw();
            Guard.WhenArgument(dictionaryFactory, "dictionaryFactory").IsNull().Throw();

            this.dictionaries      = dictionaries;
            this.unitOfWork        = unitOfWork;
            this.dictionaryFactory = dictionaryFactory;
        }
예제 #2
0
        public AddWordToDictionaryCommand(IRepository <Dictionary> dictionaries, IUnitOfWork unitOfWork, IUserProvider userProvider, IDictionariesFactory dictionariesFactory)
        {
            Guard.WhenArgument(dictionaries, "dictionaries").IsNull().Throw();
            Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw();
            Guard.WhenArgument(userProvider, "userProvider").IsNull().Throw();
            Guard.WhenArgument(dictionariesFactory, "dictionariesFactory").IsNull().Throw();

            this.dictionaries        = dictionaries;
            this.unitOfWork          = unitOfWork;
            this.userProvider        = userProvider;
            this.dictionariesFactory = dictionariesFactory;
        }
        public JsonWordsImporterProvider(IRepository <Dictionary> dictionariesRepository, IRepository <Word> wordsRepository, IUnitOfWork unitOfWork, IDictionariesFactory dictionariesFactory)
        {
            Guard.WhenArgument(dictionariesRepository, "dictionariesRepository").IsNull().Throw();
            Guard.WhenArgument(wordsRepository, "wordsRepository").IsNull().Throw();
            Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw();
            Guard.WhenArgument(dictionariesFactory, "dictionariesFactory").IsNull().Throw();

            this.dictionariesRepository = dictionariesRepository;
            this.wordsRepository        = wordsRepository;
            this.unitOfWork             = unitOfWork;
            this.dictionariesFactory    = dictionariesFactory;
        }