< Summary

Class:Microsoft.Azure.OperationalInsights.OperationalInsightsDataClientExtensions
Assembly:Microsoft.Azure.OperationalInsights
File(s):C:\Git\azure-sdk-for-net\sdk\operationalinsights\Microsoft.Azure.OperationalInsights\src\Generated\OperationalInsightsDataClientExtensions.cs
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:81
Line coverage:0% (0 of 4)
Covered branches:0
Total branches:0

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\operationalinsights\Microsoft.Azure.OperationalInsights\src\Generated\OperationalInsightsDataClientExtensions.cs

#LineLine coverage
 1// <auto-generated>
 2// Code generated by Microsoft (R) AutoRest Code Generator.
 3// Changes may cause incorrect behavior and will be lost if the code is
 4// regenerated.
 5// </auto-generated>
 6
 7namespace Microsoft.Azure.OperationalInsights
 8{
 9    using Models;
 10    using System.Collections;
 11    using System.Collections.Generic;
 12    using System.Threading;
 13    using System.Threading.Tasks;
 14
 15    /// <summary>
 16    /// Extension methods for OperationalInsightsDataClient.
 17    /// </summary>
 18    public static partial class OperationalInsightsDataClientExtensions
 19    {
 20            /// <summary>
 21            /// Execute an Analytics query
 22            /// </summary>
 23            /// <remarks>
 24            /// Executes an Analytics query for data.
 25            /// [Here](/documentation/2-Using-the-API/Query) is an example for using POST
 26            /// with an Analytics query.
 27            /// </remarks>
 28            /// <param name='operations'>
 29            /// The operations group for this extension method.
 30            /// </param>
 31            /// <param name='query'>
 32            /// The query to execute.
 33            /// </param>
 34            /// <param name='timespan'>
 35            /// Optional. The timespan over which to query data. This is an ISO8601 time
 36            /// period value.  This timespan is applied in addition to any that are
 37            /// specified in the query expression.
 38            /// </param>
 39            /// <param name='workspaces'>
 40            /// A list of workspaces that are included in the query.
 41            /// </param>
 42            public static QueryResults Query(this IOperationalInsightsDataClient operations, string query, System.TimeSp
 43            {
 044                return operations.QueryAsync(query, timespan, workspaces).GetAwaiter().GetResult();
 45            }
 46
 47            /// <summary>
 48            /// Execute an Analytics query
 49            /// </summary>
 50            /// <remarks>
 51            /// Executes an Analytics query for data.
 52            /// [Here](/documentation/2-Using-the-API/Query) is an example for using POST
 53            /// with an Analytics query.
 54            /// </remarks>
 55            /// <param name='operations'>
 56            /// The operations group for this extension method.
 57            /// </param>
 58            /// <param name='query'>
 59            /// The query to execute.
 60            /// </param>
 61            /// <param name='timespan'>
 62            /// Optional. The timespan over which to query data. This is an ISO8601 time
 63            /// period value.  This timespan is applied in addition to any that are
 64            /// specified in the query expression.
 65            /// </param>
 66            /// <param name='workspaces'>
 67            /// A list of workspaces that are included in the query.
 68            /// </param>
 69            /// <param name='cancellationToken'>
 70            /// The cancellation token.
 71            /// </param>
 72            public static async Task<QueryResults> QueryAsync(this IOperationalInsightsDataClient operations, string que
 73            {
 074                using (var _result = await operations.QueryWithHttpMessagesAsync(query, timespan, workspaces, null, canc
 75                {
 076                    return _result.Body;
 77                }
 078            }
 79
 80    }
 81}

Methods/Properties

Query(...)
QueryAsync()