< Summary

Class:Azure.Iot.Hub.Service.Models.CloudToDeviceMethodResponse
Assembly:Azure.Iot.Hub.Service
File(s):C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\CloudToDeviceMethodResponse.cs
C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\CloudToDeviceMethodResponse.Serialization.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:67
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Status()-0%100%
get_Payload()-0%100%
DeserializeCloudToDeviceMethodResponse(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\CloudToDeviceMethodResponse.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.Iot.Hub.Service.Models
 9{
 10    /// <summary> Represents the Device Method Invocation Results. </summary>
 11    public partial class CloudToDeviceMethodResponse
 12    {
 13        /// <summary> Initializes a new instance of CloudToDeviceMethodResponse. </summary>
 014        internal CloudToDeviceMethodResponse()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of CloudToDeviceMethodResponse. </summary>
 19        /// <param name="status"> Method invocation result status. </param>
 20        /// <param name="payload"> Method invocation result payload. </param>
 021        internal CloudToDeviceMethodResponse(int? status, object payload)
 22        {
 023            Status = status;
 024            Payload = payload;
 025        }
 26
 27        /// <summary> Method invocation result status. </summary>
 028        public int? Status { get; }
 29        /// <summary> Method invocation result payload. </summary>
 030        public object Payload { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\CloudToDeviceMethodResponse.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.Iot.Hub.Service.Models
 12{
 13    public partial class CloudToDeviceMethodResponse
 14    {
 15        internal static CloudToDeviceMethodResponse DeserializeCloudToDeviceMethodResponse(JsonElement element)
 16        {
 017            Optional<int> status = default;
 018            Optional<object> payload = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("status"))
 22                {
 023                    status = property.Value.GetInt32();
 024                    continue;
 25                }
 026                if (property.NameEquals("payload"))
 27                {
 028                    payload = property.Value.GetObject();
 29                    continue;
 30                }
 31            }
 032            return new CloudToDeviceMethodResponse(Optional.ToNullable(status), payload.Value);
 33        }
 34    }
 35}