public LanguageFactory(IRegisteredLanguageRepository languageRepository) { Validate.IsNotNull(languageRepository); _languageCache = new Dictionary <string, Language>(StringComparer.OrdinalIgnoreCase); _languageRepository = languageRepository; }
/// <summary> /// Constructs the factory with required dependencies /// </summary> /// <param name="languageRepository">The language repository</param> /// <param name="phraseRepository">The phrase repository</param> public RegisteredPhraseTranslatorFactory ( IRegisteredLanguageRepository languageRepository, IRegisteredPhraseRepository phraseRepository ) { Validate.IsNotNull(languageRepository); Validate.IsNotNull(phraseRepository); _languageRepository = languageRepository; _phraseRepository = phraseRepository; }
/// <summary> /// Constructs the language manager with required dependencies /// </summary> /// <param name="languageRepository">The language repository</param> /// <param name="phraseRepository">The phrase repository</param> /// <param name="unitOfWork">The unit of work</param> public LanguageManager ( IRegisteredLanguageRepository languageRepository, IRegisteredPhraseRepository phraseRepository, IUnitOfWork unitOfWork ) { Validate.IsNotNull(languageRepository); Validate.IsNotNull(phraseRepository); Validate.IsNotNull(unitOfWork); _languageRepository = languageRepository; _phraseRepository = phraseRepository; _unitOfWork = unitOfWork; }