private async void KeyTestFlyoutOpened(object sender, object e) { this.keyTestResultTextBox.Text = ""; await(!string.IsNullOrEmpty(SettingsHelper.Instance.FaceApiKey) ? CallApiAndReportResult("Face API Test: ", async() => await CognitiveServiceApiKeyTester.TestFaceApiKeyAsync( SettingsHelper.Instance.FaceApiKey, SettingsHelper.Instance.FaceApiKeyEndpoint)) : Task.CompletedTask); await(!string.IsNullOrEmpty(SettingsHelper.Instance.VisionApiKey) ? CallApiAndReportResult("Computer Vision API Test: ", async() => await CognitiveServiceApiKeyTester.TestComputerVisionApiKeyAsync( SettingsHelper.Instance.VisionApiKey, SettingsHelper.Instance.VisionApiKeyEndpoint)) : Task.CompletedTask); await(!string.IsNullOrEmpty(SettingsHelper.Instance.BingSearchApiKey) ? CallApiAndReportResult("Bing Search API Test: ", async() => await CognitiveServiceApiKeyTester.TestBingSearchApiKeyAsync(SettingsHelper.Instance.BingSearchApiKey)) : Task.CompletedTask); await(!string.IsNullOrEmpty(SettingsHelper.Instance.BingAutoSuggestionApiKey) ? CallApiAndReportResult("Bing Auto Suggestion API Test: ", async() => await CognitiveServiceApiKeyTester.TestBingAutosuggestApiKeyAsync(SettingsHelper.Instance.BingAutoSuggestionApiKey)) : Task.CompletedTask); await(!string.IsNullOrEmpty(SettingsHelper.Instance.TextAnalyticsKey) ? CallApiAndReportResult("Text Analytics API Test: ", async() => await CognitiveServiceApiKeyTester.TestTextAnalyticsApiKeyAsync( SettingsHelper.Instance.TextAnalyticsKey, SettingsHelper.Instance.TextAnalyticsApiKeyEndpoint)) : Task.CompletedTask); }
private async void KeyTestFlyoutOpened(object sender, object e) { this.keyTestResultTextBox.Text = ""; await CallApiAndReportResult("Face API Test: ", async() => await CognitiveServiceApiKeyTester.TestFaceApiKeyAsync( SettingsHelper.Instance.FaceApiKey, SettingsHelper.Instance.FaceApiKeyEndpoint)); await CallApiAndReportResult("Text To Speech API Test: ", async() => await CognitiveServiceApiKeyTester.TestTextToSpeechApiKeyAsync( SettingsHelper.Instance.TextToSpeechApiKey, SettingsHelper.Instance.TextToSpeechApiKeyEndpoint)); await CallApiAndReportResult("Speech To Text API Test: ", async() => await CognitiveServiceApiKeyTester.TestSpeechToTextApiKeyAsync( SettingsHelper.Instance.SpeechToTextApiKey, SettingsHelper.Instance.SpeechToTextApiKeyEndpoint)); await CallApiAndReportResult("LUIS API Test: ", async() => await CognitiveServiceApiKeyTester.TestLuisApiKeyAsync( SettingsHelper.Instance.LuisApiKey, SettingsHelper.Instance.LuisApiKeyEndpoint)); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.VisionApiKey) // ? CallApiAndReportResult("Computer Vision API Test: ", async () => await CognitiveServiceApiKeyTester.TestComputerVisionApiKeyAsync( // SettingsHelper.Instance.VisionApiKey, SettingsHelper.Instance.VisionApiKeyEndpoint)) // : Task.CompletedTask); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.CustomVisionTrainingApiKey) // ? CallApiAndReportResult("Custom Vision Training API Test: ", async () => await CognitiveServiceApiKeyTester.TestCustomVisionTrainingApiKeyAsync( // SettingsHelper.Instance.CustomVisionTrainingApiKey, SettingsHelper.Instance.CustomVisionTrainingApiKeyEndpoint)) // : Task.CompletedTask); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.BingSearchApiKey) // ? CallApiAndReportResult("Bing Search API Test: ", async () => await CognitiveServiceApiKeyTester.TestBingSearchApiKeyAsync(SettingsHelper.Instance.BingSearchApiKey)) // : Task.CompletedTask); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.BingAutoSuggestionApiKey) // ? CallApiAndReportResult("Bing Auto Suggestion API Test: ", async () => await CognitiveServiceApiKeyTester.TestBingAutosuggestApiKeyAsync(SettingsHelper.Instance.BingAutoSuggestionApiKey)) // : Task.CompletedTask); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.TextAnalyticsKey) // ? CallApiAndReportResult("Text Analytics API Test: ", async () => await CognitiveServiceApiKeyTester.TestTextAnalyticsApiKeyAsync( // SettingsHelper.Instance.TextAnalyticsKey, SettingsHelper.Instance.TextAnalyticsApiKeyEndpoint)) // : Task.CompletedTask); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.TranslatorTextApiKey) // ? CallApiAndReportResult("Translator Text API Test: ", async () => await CognitiveServiceApiKeyTester.TestTranslatorTextApiKeyAsync(SettingsHelper.Instance.TranslatorTextApiKey)) // : Task.CompletedTask); //await (!string.IsNullOrEmpty(SettingsHelper.Instance.AnomalyDetectorApiKey) // ? CallApiAndReportResult("Anomaly Detector API Test: ", async () => await CognitiveServiceApiKeyTester.TestAnomalyDetectorApiKeyAsync(SettingsHelper.Instance.AnomalyDetectorApiKey)) // : Task.CompletedTask); }