< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.OperationDefinition
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\OperationDefinition.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\OperationDefinition.Serialization.cs
Covered lines:15
Uncovered lines:4
Coverable lines:19
Total lines:75
Line coverage:78.9% (15 of 19)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Name()-0%100%
get_Display()-0%100%
DeserializeOperationDefinition(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\OperationDefinition.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.AppConfiguration.Models
 9{
 10    /// <summary> The definition of a configuration store operation. </summary>
 11    public partial class OperationDefinition
 12    {
 13        /// <summary> Initializes a new instance of OperationDefinition. </summary>
 014        internal OperationDefinition()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of OperationDefinition. </summary>
 19        /// <param name="name"> Operation name: {provider}/{resource}/{operation}. </param>
 20        /// <param name="display"> The display information for the configuration store operation. </param>
 11221        internal OperationDefinition(string name, OperationDefinitionDisplay display)
 22        {
 11223            Name = name;
 11224            Display = display;
 11225        }
 26
 27        /// <summary> Operation name: {provider}/{resource}/{operation}. </summary>
 028        public string Name { get; }
 29        /// <summary> The display information for the configuration store operation. </summary>
 030        public OperationDefinitionDisplay Display { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\OperationDefinition.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.AppConfiguration.Models
 12{
 13    public partial class OperationDefinition
 14    {
 15        internal static OperationDefinition DeserializeOperationDefinition(JsonElement element)
 16        {
 11217            string name = default;
 11218            OperationDefinitionDisplay display = default;
 134419            foreach (var property in element.EnumerateObject())
 20            {
 56021                if (property.NameEquals("name"))
 22                {
 11223                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 11227                    name = property.Value.GetString();
 11228                    continue;
 29                }
 44830                if (property.NameEquals("display"))
 31                {
 11232                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 11236                    display = OperationDefinitionDisplay.DeserializeOperationDefinitionDisplay(property.Value);
 37                    continue;
 38                }
 39            }
 11240            return new OperationDefinition(name, display);
 41        }
 42    }
 43}