< Summary

Class:Microsoft.Extensions.Azure.TextAnalyticsClientBuilderExtensions
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextAnalyticsClientBuilderExtensions.cs
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:43
Line coverage:0% (0 of 3)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
AddTextAnalyticsClient(...)-0%100%
AddTextAnalyticsClient(...)-0%100%
AddTextAnalyticsClient(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextAnalyticsClientBuilderExtensions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure;
 6using Azure.AI.TextAnalytics;
 7using Azure.Core.Extensions;
 8
 9namespace Microsoft.Extensions.Azure
 10{
 11    /// <summary>
 12    /// Extension methods to add <see cref="TextAnalyticsClient"/> client to clients builder.
 13    /// </summary>
 14    public static class TextAnalyticsClientBuilderExtensions
 15    {
 16        /// <summary>
 17        /// Registers a <see cref="TextAnalyticsClient"/> instance with the provided <paramref name="endpoint"/>.
 18        /// </summary>
 19        public static IAzureClientBuilder<TextAnalyticsClient, TextAnalyticsClientOptions> AddTextAnalyticsClient<TBuild
 20            where TBuilder : IAzureClientFactoryBuilderWithCredential
 21        {
 022            return builder.RegisterClientFactory<TextAnalyticsClient, TextAnalyticsClientOptions>((options, credential) 
 23        }
 24
 25        /// <summary>
 26        /// Registers a <see cref="TextAnalyticsClient"/> instance with the provided <paramref name="endpoint"/> and <pa
 27        /// </summary>
 28        public static IAzureClientBuilder<TextAnalyticsClient, TextAnalyticsClientOptions> AddTextAnalyticsClient<TBuild
 29            where TBuilder : IAzureClientFactoryBuilder
 30        {
 031            return builder.RegisterClientFactory<TextAnalyticsClient, TextAnalyticsClientOptions>(options => new TextAna
 32        }
 33
 34        /// <summary>
 35        /// Registers a <see cref="TextAnalyticsClient"/> instance with connection options loaded from the provided <par
 36        /// </summary>
 37        public static IAzureClientBuilder<TextAnalyticsClient, TextAnalyticsClientOptions> AddTextAnalyticsClient<TBuild
 38            where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration>
 39        {
 040            return builder.RegisterClientFactory<TextAnalyticsClient, TextAnalyticsClientOptions>(configuration);
 41        }
 42    }
 43}