< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinInfoX509Thumbprint.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinInfoX509Thumbprint.Serialization.cs
Covered lines:13
Uncovered lines:4
Coverable lines:17
Total lines:67
Line coverage:76.4% (13 of 17)
Covered branches:6
Total branches:6
Branch coverage:100% (6 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_PrimaryThumbprint()-0%100%
get_SecondaryThumbprint()-0%100%
DeserializeDeviceTwinInfoX509Thumbprint(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinInfoX509Thumbprint.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8namespace Azure.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certific
 11    public partial class DeviceTwinInfoX509Thumbprint
 12    {
 13        /// <summary> Initializes a new instance of DeviceTwinInfoX509Thumbprint. </summary>
 014        internal DeviceTwinInfoX509Thumbprint()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeviceTwinInfoX509Thumbprint. </summary>
 19        /// <param name="primaryThumbprint"> Primary thumbprint for the x509 certificate. </param>
 20        /// <param name="secondaryThumbprint"> Secondary thumbprint for the x509 certificate. </param>
 421        internal DeviceTwinInfoX509Thumbprint(string primaryThumbprint, string secondaryThumbprint)
 22        {
 423            PrimaryThumbprint = primaryThumbprint;
 424            SecondaryThumbprint = secondaryThumbprint;
 425        }
 26
 27        /// <summary> Primary thumbprint for the x509 certificate. </summary>
 028        public string PrimaryThumbprint { get; }
 29        /// <summary> Secondary thumbprint for the x509 certificate. </summary>
 030        public string SecondaryThumbprint { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceTwinInfoX509Thumbprint.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class DeviceTwinInfoX509Thumbprint
 14    {
 15        internal static DeviceTwinInfoX509Thumbprint DeserializeDeviceTwinInfoX509Thumbprint(JsonElement element)
 16        {
 417            Optional<string> primaryThumbprint = default;
 418            Optional<string> secondaryThumbprint = default;
 2419            foreach (var property in element.EnumerateObject())
 20            {
 821                if (property.NameEquals("primaryThumbprint"))
 22                {
 423                    primaryThumbprint = property.Value.GetString();
 424                    continue;
 25                }
 426                if (property.NameEquals("secondaryThumbprint"))
 27                {
 428                    secondaryThumbprint = property.Value.GetString();
 29                    continue;
 30                }
 31            }
 432            return new DeviceTwinInfoX509Thumbprint(primaryThumbprint.Value, secondaryThumbprint.Value);
 33        }
 34    }
 35}