< Summary

Class:Azure.ResourceManager.EventHubs.Models.MessagingRegionsProperties
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegionsProperties.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegionsProperties.Serialization.cs
Covered lines:0
Uncovered lines:28
Coverable lines:28
Total lines:91
Line coverage:0% (0 of 28)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Code()-0%100%
get_FullName()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeMessagingRegionsProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegionsProperties.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.ResourceManager.EventHubs.Models
 9{
 10    /// <summary> Properties of Messaging Region. </summary>
 11    public partial class MessagingRegionsProperties
 12    {
 13        /// <summary> Initializes a new instance of MessagingRegionsProperties. </summary>
 014        public MessagingRegionsProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of MessagingRegionsProperties. </summary>
 19        /// <param name="code"> Region code. </param>
 20        /// <param name="fullName"> Full name of the region. </param>
 021        internal MessagingRegionsProperties(string code, string fullName)
 22        {
 023            Code = code;
 024            FullName = fullName;
 025        }
 26
 27        /// <summary> Region code. </summary>
 028        public string Code { get; }
 29        /// <summary> Full name of the region. </summary>
 030        public string FullName { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\MessagingRegionsProperties.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.ResourceManager.EventHubs.Models
 12{
 13    public partial class MessagingRegionsProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Code != null)
 19            {
 020                writer.WritePropertyName("code");
 021                writer.WriteStringValue(Code);
 22            }
 023            if (FullName != null)
 24            {
 025                writer.WritePropertyName("fullName");
 026                writer.WriteStringValue(FullName);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static MessagingRegionsProperties DeserializeMessagingRegionsProperties(JsonElement element)
 32        {
 033            string code = default;
 034            string fullName = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("code"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    code = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("fullName"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    fullName = property.Value.GetString();
 53                    continue;
 54                }
 55            }
 056            return new MessagingRegionsProperties(code, fullName);
 57        }
 58    }
 59}