< Summary

Class:Azure.Messaging.EventGrid.EventGridSharedAccessSignatureCredential
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\EventGridSharedAccessSignatureCredential.cs
Covered lines:4
Uncovered lines:2
Coverable lines:6
Total lines:37
Line coverage:66.6% (4 of 6)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Signature()-100%100%
Update(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Customization\EventGridSharedAccessSignatureCredential.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.Collections.Generic;
 6using System.Text;
 7
 8namespace Azure.Messaging.EventGrid
 9{
 10    /// <summary>
 11    /// SAS token used to authenticate to the Event Grid service.
 12    /// </summary>
 13    public class EventGridSharedAccessSignatureCredential
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="EventGridSharedAccessSignatureCredential"/> class.
 17        /// </summary>
 18        /// <param name="signature">SAS token used for authentication</param>
 419        public EventGridSharedAccessSignatureCredential(string signature)
 20        {
 421            Signature = signature;
 422        }
 23        /// <summary>
 24        /// SAS token used to authenticate to the Event Grid service.
 25        /// </summary>
 826        public string Signature { get; private set; }
 27
 28        /// <summary>
 29        /// Updates the SAS token. This is intended to be used when you've regenerated the token and want to update long
 30        /// </summary>
 31        /// <param name="signature">SAS token used for authentication</param>
 32        public void Update(string signature)
 33        {
 034            Signature = signature;
 035        }
 36    }
 37}