< Summary

Class:Microsoft.Azure.EventGrid.Models.TopicCredentials
Assembly:Microsoft.Azure.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Microsoft.Azure.EventGrid\src\Customization\Models\TopicCredentials.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:31
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
InitializeServiceClient(...)-0%100%
ProcessHttpRequestAsync()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Microsoft.Azure.EventGrid\src\Customization\Models\TopicCredentials.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5using System.Net.Http;
 6using System.Threading;
 7using System.Threading.Tasks;
 8using Microsoft.Rest;
 9
 10namespace Microsoft.Azure.EventGrid.Models
 11{
 12    public class TopicCredentials : ServiceClientCredentials
 13    {
 14        readonly string topicKey;
 15
 016        public TopicCredentials(string topicKey)
 17        {
 018            this.topicKey = topicKey;
 019        }
 20
 21        public override void InitializeServiceClient<T>(ServiceClient<T> client)
 22        {
 023        }
 24
 25        public override async Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationTok
 26        {
 027            request.Headers.Add("aeg-sas-key", this.topicKey);
 028            await base.ProcessHttpRequestAsync(request, cancellationToken).ConfigureAwait(false);
 029        }
 30    }
 31}