< Summary

Class:Microsoft.Azure.Search.SearchServiceClientExtensions
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\SearchServiceClientExtensions.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:59
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
GetServiceStatistics(...)-100%100%
GetServiceStatisticsAsync()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\SearchServiceClientExtensions.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Search
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Models;
 16    using System.Threading;
 17    using System.Threading.Tasks;
 18
 19    /// <summary>
 20    /// Extension methods for SearchServiceClient.
 21    /// </summary>
 22    public static partial class SearchServiceClientExtensions
 23    {
 24            /// <summary>
 25            /// Gets service level statistics for a search service.
 26            /// </summary>
 27            /// <param name='operations'>
 28            /// The operations group for this extension method.
 29            /// </param>
 30            /// <param name='searchRequestOptions'>
 31            /// Additional parameters for the operation
 32            /// </param>
 33            public static ServiceStatistics GetServiceStatistics(this ISearchServiceClient operations, SearchRequestOpti
 34            {
 235                return operations.GetServiceStatisticsAsync(searchRequestOptions).GetAwaiter().GetResult();
 36            }
 37
 38            /// <summary>
 39            /// Gets service level statistics for a search service.
 40            /// </summary>
 41            /// <param name='operations'>
 42            /// The operations group for this extension method.
 43            /// </param>
 44            /// <param name='searchRequestOptions'>
 45            /// Additional parameters for the operation
 46            /// </param>
 47            /// <param name='cancellationToken'>
 48            /// The cancellation token.
 49            /// </param>
 50            public static async Task<ServiceStatistics> GetServiceStatisticsAsync(this ISearchServiceClient operations, 
 51            {
 252                using (var _result = await operations.GetServiceStatisticsWithHttpMessagesAsync(searchRequestOptions, nu
 53                {
 254                    return _result.Body;
 55                }
 256            }
 57
 58    }
 59}