< Summary

Class:Azure.DigitalTwins.Core.InnerError
Assembly:Azure.DigitalTwins.Core
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\InnerError.cs
C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\InnerError.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_Code()-0%100%
get_Innererror()-0%100%
DeserializeInnerError(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\InnerError.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.DigitalTwins.Core
 9{
 10    /// <summary> A more specific error description than was provided by the containing error. </summary>
 11    internal partial class InnerError
 12    {
 13        /// <summary> Initializes a new instance of InnerError. </summary>
 014        internal InnerError()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of InnerError. </summary>
 19        /// <param name="code"> A more specific error code than was provided by the containing error. </param>
 20        /// <param name="innererror"> An object containing more specific information than the current object about the e
 021        internal InnerError(string code, InnerError innererror)
 22        {
 023            Code = code;
 024            Innererror = innererror;
 025        }
 26
 27        /// <summary> A more specific error code than was provided by the containing error. </summary>
 028        public string Code { get; }
 29        /// <summary> An object containing more specific information than the current object about the error. </summary>
 030        public InnerError Innererror { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\InnerError.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.DigitalTwins.Core
 12{
 13    internal partial class InnerError
 14    {
 15        internal static InnerError DeserializeInnerError(JsonElement element)
 16        {
 017            Optional<string> code = default;
 018            Optional<InnerError> innererror = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("code"))
 22                {
 023                    code = property.Value.GetString();
 024                    continue;
 25                }
 026                if (property.NameEquals("innererror"))
 27                {
 028                    innererror = DeserializeInnerError(property.Value);
 29                    continue;
 30                }
 31            }
 032            return new InnerError(code.Value, innererror.Value);
 33        }
 34    }
 35}