Пример #1
0
 public TranslationSender(
     ITextTranslationRequestFactory requestFactory,
     ITextTranslationService translationService)
 {
     _textrequestFactory = requestFactory;
     _textTranslator     = translationService;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:XamarinCognitiveServices.ViewModels.TextApiViewModel"/> class.
 /// </summary>
 public TextApiViewModel()
 {
     _bingSpellCheckService  = new BingSpellCheckService();
     _textTranslationService = new TextTranslationService(new AuthenticationService(Constants.TextTranslatorApiKey));
     SpellCheckCommand       = new Command(OnSpellCheck);
     TranslateCommand        = new Command(OnTranslate);
 }
Пример #3
0
        public TodoItemPage()
        {
            InitializeComponent();

            bingSpeechService      = new BingSpeechService(new AuthenticationService(Constants.BingSpeechApiKey), Device.RuntimePlatform);
            bingSpellCheckService  = new BingSpellCheckService();
            textTranslationService = new TextTranslationService(new AuthenticationService(Constants.TextTranslatorApiKey));
        }
Пример #4
0
        public AddPage()
        {
            InitializeComponent();
            Context = this.BindingContext as AddPageViewModel;

            bingSpeechService      = new BingSpeechService(new AuthenticationService(Constants.BingSpeechApiKey), Device.RuntimePlatform);
            bingSpellCheckService  = new BingSpellCheckService();
            textTranslationService = new TextTranslationService(new AuthenticationService(Constants.TextTranslatorApiKey));

            audioRecordingService = new AudioRecorderService();
        }
Пример #5
0
        public TodoItemPage(TodoItem item)
        {
            InitializeComponent();
            this.BackgroundColor = Color.FromHex("#FFFFFF");
            this.reteived        = item;
            BindingContext       = item;

            bingSpeechService      = new BingSpeechService(new AuthenticationService(Constants.BingSpeechApiKey), Device.OS.ToString());
            bingSpellCheckService  = new BingSpellCheckService();
            textTranslationService = new TextTranslationService(new AuthenticationService(Constants.TextTranslatorApiKey));
        }
Пример #6
0
 public Translate()
 {
     InitializeComponent();
     textTranslationService = new TextTranslationService(new AuthenticationService(Constants.TextTranslatorApiKey));
 }
Пример #7
0
 public ContentTranslationService(ITextTranslationService textTranslationService, IContentService contentService)
 {
     _textTranslationService = textTranslationService;
     _contentService         = contentService;
 }
 public SentimentAnalyzer(ITextTranslationService textTranslationService,
                          ISentimentAnalysisService sentimentAnalysiService)
 {
     _textTranslationService  = textTranslationService;
     _sentimentAnalysiService = sentimentAnalysiService;
 }
 public DictionaryTranslationService(ITextTranslationService textService, ILocalizationService localizationService)
 {
     _textService         = textService;
     _localizationService = localizationService;
 }