< Summary

Class:Azure.Data.AppConfiguration.ApiVersionPolicy
Assembly:Azure.Data.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.Data.AppConfiguration\src\ApiVersionPolicy.cs
Covered lines:5
Uncovered lines:0
Coverable lines:5
Total lines:25
Line coverage:100% (5 of 5)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
OnSendingRequest(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.Data.AppConfiguration\src\ApiVersionPolicy.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Threading.Tasks;
 6using Azure.Core;
 7using Azure.Core.Pipeline;
 8
 9namespace Azure.Data.AppConfiguration
 10{
 11    internal class ApiVersionPolicy : HttpPipelineSynchronousPolicy
 12    {
 13        private readonly string _versionString;
 14
 32415        public ApiVersionPolicy(string versionString)
 16        {
 32417            _versionString = versionString;
 32418        }
 19
 20        public override void OnSendingRequest(HttpMessage message)
 21        {
 77622            message.Request.Uri.AppendQuery("api-version", _versionString);
 77623        }
 24    }
 25}

Methods/Properties

.ctor(...)
OnSendingRequest(...)