< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.DeviceConnectionStateEventInfo
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceConnectionStateEventInfo.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceConnectionStateEventInfo.Serialization.cs
Covered lines:9
Uncovered lines:2
Coverable lines:11
Total lines:57
Line coverage:81.8% (9 of 11)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_SequenceNumber()-100%100%
DeserializeDeviceConnectionStateEventInfo(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceConnectionStateEventInfo.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> Information about the device connection state event. </summary>
 11    public partial class DeviceConnectionStateEventInfo
 12    {
 13        /// <summary> Initializes a new instance of DeviceConnectionStateEventInfo. </summary>
 014        internal DeviceConnectionStateEventInfo()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeviceConnectionStateEventInfo. </summary>
 19        /// <param name="sequenceNumber"> Sequence number is string representation of a hexadecimal number. string compa
 420        internal DeviceConnectionStateEventInfo(string sequenceNumber)
 21        {
 422            SequenceNumber = sequenceNumber;
 423        }
 24
 25        /// <summary> Sequence number is string representation of a hexadecimal number. string compare can be used to id
 226        public string SequenceNumber { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\DeviceConnectionStateEventInfo.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 DeviceConnectionStateEventInfo
 14    {
 15        internal static DeviceConnectionStateEventInfo DeserializeDeviceConnectionStateEventInfo(JsonElement element)
 16        {
 417            Optional<string> sequenceNumber = default;
 1618            foreach (var property in element.EnumerateObject())
 19            {
 420                if (property.NameEquals("sequenceNumber"))
 21                {
 422                    sequenceNumber = property.Value.GetString();
 23                    continue;
 24                }
 25            }
 426            return new DeviceConnectionStateEventInfo(sequenceNumber.Value);
 27        }
 28    }
 29}