< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
Delete(...)-0%100%
DeleteAsync()-100%100%
DeleteWithHttpMessages(...)-0%100%
GetProperties(...)-0%100%
GetPropertiesAsync()-100%100%
GetPropertiesWithHttpMessages(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Personalizer\src\Generated\LogExtensions.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 Log.
 22    /// </summary>
 23    public static partial class LogExtensions
 24    {
 25            /// <summary>
 26            /// Deletes Logs.
 27            /// </summary>
 28            /// <remarks>
 29            /// Delete all generated logs.
 30            /// </remarks>
 31            /// <param name='operations'>
 32            /// The operations group for this extension method.
 33            /// </param>
 34            public static void Delete(this ILog operations)
 35            {
 036                operations.DeleteAsync().GetAwaiter().GetResult();
 037            }
 38
 39            /// <summary>
 40            /// Deletes Logs.
 41            /// </summary>
 42            /// <remarks>
 43            /// Delete all generated logs.
 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 DeleteAsync(this ILog operations, CancellationToken cancellationToken = default(Can
 52            {
 253                (await operations.DeleteWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose();
 254            }
 55
 56            /// <summary>
 57            /// Deletes Logs.
 58            /// </summary>
 59            /// <remarks>
 60            /// Delete all generated logs.
 61            /// </remarks>
 62            /// <param name='operations'>
 63            /// The operations group for this extension method.
 64            /// </param>
 65            /// <param name='customHeaders'>
 66            /// Headers that will be added to request.
 67            /// </param>
 68            public static HttpOperationResponse DeleteWithHttpMessages(this ILog operations, Dictionary<string, List<str
 69            {
 070                return operations.DeleteWithHttpMessagesAsync(customHeaders, CancellationToken.None).ConfigureAwait(fals
 71            }
 72
 73            /// <summary>
 74            /// Get Log Properties.
 75            /// </summary>
 76            /// <remarks>
 77            /// Get properties of generated logs.
 78            /// </remarks>
 79            /// <param name='operations'>
 80            /// The operations group for this extension method.
 81            /// </param>
 82            public static LogsProperties GetProperties(this ILog operations)
 83            {
 084                return operations.GetPropertiesAsync().GetAwaiter().GetResult();
 85            }
 86
 87            /// <summary>
 88            /// Get Log Properties.
 89            /// </summary>
 90            /// <remarks>
 91            /// Get properties of generated logs.
 92            /// </remarks>
 93            /// <param name='operations'>
 94            /// The operations group for this extension method.
 95            /// </param>
 96            /// <param name='cancellationToken'>
 97            /// The cancellation token.
 98            /// </param>
 99            public static async Task<LogsProperties> GetPropertiesAsync(this ILog operations, CancellationToken cancella
 100            {
 2101                using (var _result = await operations.GetPropertiesWithHttpMessagesAsync(null, cancellationToken).Config
 102                {
 2103                    return _result.Body;
 104                }
 2105            }
 106
 107            /// <summary>
 108            /// Get Log Properties.
 109            /// </summary>
 110            /// <remarks>
 111            /// Get properties of generated logs.
 112            /// </remarks>
 113            /// <param name='operations'>
 114            /// The operations group for this extension method.
 115            /// </param>
 116            /// <param name='customHeaders'>
 117            /// Headers that will be added to request.
 118            /// </param>
 119            public static HttpOperationResponse<LogsProperties> GetPropertiesWithHttpMessages(this ILog operations, Dict
 120            {
 0121                return operations.GetPropertiesWithHttpMessagesAsync(customHeaders, CancellationToken.None).ConfigureAwa
 122            }
 123
 124    }
 125}