< Summary

Class:Microsoft.Azure.CognitiveServices.Personalizer.ServiceConfigurationOperationsExtensions
Assembly:Microsoft.Azure.CognitiveServices.Personalizer
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Personalizer\src\Generated\ServiceConfigurationOperationsExtensions.cs
Covered lines:6
Uncovered lines:4
Coverable lines:10
Total lines:137
Line coverage:60% (6 of 10)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
Get(...)-0%100%
GetAsync()-100%100%
GetWithHttpMessages(...)-0%100%
Update(...)-0%100%
UpdateAsync()-100%100%
UpdateWithHttpMessages(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Personalizer\src\Generated\ServiceConfigurationOperationsExtensions.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.CognitiveServices.Personalizer
 12{
 13    using Microsoft.Rest;
 14    using Models;
 15    using System.Collections;
 16    using System.Collections.Generic;
 17    using System.Threading;
 18    using System.Threading.Tasks;
 19
 20    /// <summary>
 21    /// Extension methods for ServiceConfigurationOperations.
 22    /// </summary>
 23    public static partial class ServiceConfigurationOperationsExtensions
 24    {
 25            /// <summary>
 26            /// Get Service Configuration.
 27            /// </summary>
 28            /// <remarks>
 29            /// Get the Personalizer service configuration.
 30            /// </remarks>
 31            /// <param name='operations'>
 32            /// The operations group for this extension method.
 33            /// </param>
 34            public static ServiceConfiguration Get(this IServiceConfigurationOperations operations)
 35            {
 036                return operations.GetAsync().GetAwaiter().GetResult();
 37            }
 38
 39            /// <summary>
 40            /// Get Service Configuration.
 41            /// </summary>
 42            /// <remarks>
 43            /// Get the Personalizer service configuration.
 44            /// </remarks>
 45            /// <param name='operations'>
 46            /// The operations group for this extension method.
 47            /// </param>
 48            /// <param name='cancellationToken'>
 49            /// The cancellation token.
 50            /// </param>
 51            public static async Task<ServiceConfiguration> GetAsync(this IServiceConfigurationOperations operations, Can
 52            {
 253                using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(f
 54                {
 255                    return _result.Body;
 56                }
 257            }
 58
 59            /// <summary>
 60            /// Get Service Configuration.
 61            /// </summary>
 62            /// <remarks>
 63            /// Get the Personalizer service configuration.
 64            /// </remarks>
 65            /// <param name='operations'>
 66            /// The operations group for this extension method.
 67            /// </param>
 68            /// <param name='customHeaders'>
 69            /// Headers that will be added to request.
 70            /// </param>
 71            public static HttpOperationResponse<ServiceConfiguration> GetWithHttpMessages(this IServiceConfigurationOper
 72            {
 073                return operations.GetWithHttpMessagesAsync(customHeaders, CancellationToken.None).ConfigureAwait(false).
 74            }
 75
 76            /// <summary>
 77            /// Update Service Configuration.
 78            /// </summary>
 79            /// <remarks>
 80            /// Update the Personalizer service configuration.
 81            /// </remarks>
 82            /// <param name='operations'>
 83            /// The operations group for this extension method.
 84            /// </param>
 85            /// <param name='config'>
 86            /// The personalizer service configuration.
 87            /// </param>
 88            public static ServiceConfiguration Update(this IServiceConfigurationOperations operations, ServiceConfigurat
 89            {
 090                return operations.UpdateAsync(config).GetAwaiter().GetResult();
 91            }
 92
 93            /// <summary>
 94            /// Update Service Configuration.
 95            /// </summary>
 96            /// <remarks>
 97            /// Update the Personalizer service configuration.
 98            /// </remarks>
 99            /// <param name='operations'>
 100            /// The operations group for this extension method.
 101            /// </param>
 102            /// <param name='config'>
 103            /// The personalizer service configuration.
 104            /// </param>
 105            /// <param name='cancellationToken'>
 106            /// The cancellation token.
 107            /// </param>
 108            public static async Task<ServiceConfiguration> UpdateAsync(this IServiceConfigurationOperations operations, 
 109            {
 2110                using (var _result = await operations.UpdateWithHttpMessagesAsync(config, null, cancellationToken).Confi
 111                {
 2112                    return _result.Body;
 113                }
 2114            }
 115
 116            /// <summary>
 117            /// Update Service Configuration.
 118            /// </summary>
 119            /// <remarks>
 120            /// Update the Personalizer service configuration.
 121            /// </remarks>
 122            /// <param name='operations'>
 123            /// The operations group for this extension method.
 124            /// </param>
 125            /// <param name='config'>
 126            /// The personalizer service configuration.
 127            /// </param>
 128            /// <param name='customHeaders'>
 129            /// Headers that will be added to request.
 130            /// </param>
 131            public static HttpOperationResponse<ServiceConfiguration> UpdateWithHttpMessages(this IServiceConfigurationO
 132            {
 0133                return operations.UpdateWithHttpMessagesAsync(config, customHeaders, CancellationToken.None).ConfigureAw
 134            }
 135
 136    }
 137}