public BookRepository(
     AppDbContext dbContext,
     ITextTranslatorService translatorService,
     ILoggerFactory loggerFactory)
 {
     this.dbContext         = dbContext;
     this.translatorService = translatorService;
     logger = loggerFactory.CreateLogger <BookRepository>();
 }
Esempio n. 2
0
 public PokemonClient(ITextTranslatorService textTranslator)
 {
     _textTranslator = textTranslator;
     if (_httpClient == null)
     {
         _httpClient             = new HttpClient();
         _httpClient.BaseAddress = new Uri("https://pokeapi.co/api/v2/");
         _httpClient.Timeout     = new TimeSpan(0, 0, 10);
         _httpClient.DefaultRequestHeaders.Clear();
     }
 }
Esempio n. 3
0
 public PostsDomain(
     IPostRepository postRepository,
     ILanguageRepository languageRepository,
     ITextTranslatorService textTranslatorService,
     IDocumentTranslationService documentTranslationService,
     IStorageService <TranslateAzureBlobStorageContainer> storageService,
     ITranslatedDocumentNamingStrategy namingStrategy
     )
 {
     this.postRepository             = postRepository;
     this.languageRepository         = languageRepository;
     this.textTranslatorService      = textTranslatorService;
     this.documentTranslationService = documentTranslationService;
     this.storageService             = storageService;
     this.namingStrategy             = namingStrategy;
 }
Esempio n. 4
0
 public PokemonService(ITextTranslatorService textTranslator)
 {
     _textTranslator = textTranslator ??
                       throw new ArgumentNullException(nameof(textTranslator));
 }
 public TextTranslationsController(ITextTranslatorService translatorService)
 {
     this.translatorService = translatorService;
 }