public static Service Instance(LanguageTranslatorOptions options) { _instance = _instance ?? new Service(); if (_languageTranslator == null) { _languageTranslator = new LanguageTranslatorService(); } // set the credentials _languageTranslator.SetCredential(options.UserName, options.Password); return(_instance); }
public LanguageTranslatorController(IOptions <LanguageTranslatorOptions> options) { Options = options.Value; }