< Summary

Class:Azure.Security.KeyVault.Keys.Cryptography.KeyWrapParameters
Assembly:Azure.Security.KeyVault.Keys
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Keys\src\Cryptography\KeyWrapParameters.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:29
Line coverage:100% (9 of 9)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-100%100%
get_Algorithm()-100%100%
get_Key()-100%100%
Azure.Security.KeyVault.IJsonSerializable.WriteProperties(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Keys\src\Cryptography\KeyWrapParameters.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Text.Json;
 5
 6namespace Azure.Security.KeyVault.Keys.Cryptography
 7{
 8    internal struct KeyWrapParameters : IJsonSerializable
 9    {
 210        private static readonly JsonEncodedText s_algorithmPropertyNameBytes = JsonEncodedText.Encode("alg");
 211        private static readonly JsonEncodedText s_keyPropertyNameBytes = JsonEncodedText.Encode("value");
 12
 20413        public string Algorithm { get; set; }
 14
 20415        public byte[] Key { get; set; }
 16
 17        void IJsonSerializable.WriteProperties(Utf8JsonWriter json)
 18        {
 6819            if (Algorithm != null)
 20            {
 6821                json.WriteString(s_algorithmPropertyNameBytes, Algorithm);
 22            }
 6823            if (Key != null)
 24            {
 6825                json.WriteString(s_keyPropertyNameBytes, Base64Url.Encode(Key));
 26            }
 6827        }
 28    }
 29}