< Summary

Class:Azure.ResourceManager.Resources.Models.ParameterDefinitionsValueMetadata
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ParameterDefinitionsValueMetadata.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ParameterDefinitionsValueMetadata.Serialization.cs
Covered lines:23
Uncovered lines:36
Coverable lines:59
Total lines:152
Line coverage:38.9% (23 of 59)
Covered branches:15
Total branches:22
Branch coverage:68.1% (15 of 22)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_DisplayName()-0%100%
get_Description()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeParameterDefinitionsValueMetadata(...)-94.74%92.86%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ParameterDefinitionsValueMetadata.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.Collections;
 9using System.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Resources.Models
 12{
 13    /// <summary> General metadata for the parameter. </summary>
 14    public partial class ParameterDefinitionsValueMetadata : IDictionary<string, object>
 15    {
 16        /// <summary> Initializes a new instance of ParameterDefinitionsValueMetadata. </summary>
 017        public ParameterDefinitionsValueMetadata()
 18        {
 019            AdditionalProperties = new Dictionary<string, object>();
 020        }
 21
 22        /// <summary> Initializes a new instance of ParameterDefinitionsValueMetadata. </summary>
 23        /// <param name="displayName"> The display name for the parameter. </param>
 24        /// <param name="description"> The description of the parameter. </param>
 25        /// <param name="additionalProperties"> . </param>
 6401626        internal ParameterDefinitionsValueMetadata(string displayName, string description, IDictionary<string, object> a
 27        {
 6401628            DisplayName = displayName;
 6401629            Description = description;
 6401630            AdditionalProperties = additionalProperties ?? new Dictionary<string, object>();
 6401631        }
 32
 33        /// <summary> The display name for the parameter. </summary>
 034        public string DisplayName { get; set; }
 35        /// <summary> The description of the parameter. </summary>
 036        public string Description { get; set; }
 037        internal IDictionary<string, object> AdditionalProperties { get; }
 38        /// <inheritdoc />
 039        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 40        /// <inheritdoc />
 041        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 42        /// <inheritdoc />
 043        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 44        /// <inheritdoc />
 045        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 46        /// <inheritdoc />
 047        public ICollection<string> Keys => AdditionalProperties.Keys;
 48        /// <inheritdoc />
 049        public ICollection<object> Values => AdditionalProperties.Values;
 50        /// <inheritdoc />
 051        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 52        /// <inheritdoc />
 053        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 54        /// <inheritdoc />
 055        public bool Remove(string key) => AdditionalProperties.Remove(key);
 56        /// <inheritdoc />
 057        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 58        /// <inheritdoc />
 059        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 60        /// <inheritdoc />
 061        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 62        /// <inheritdoc />
 063        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 64        /// <inheritdoc />
 065        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 66        /// <inheritdoc />
 067        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 68        /// <inheritdoc />
 69        public object this[string key]
 70        {
 071            get => AdditionalProperties[key];
 072            set => AdditionalProperties[key] = value;
 73        }
 74    }
 75}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ParameterDefinitionsValueMetadata.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Resources.Models
 13{
 14    public partial class ParameterDefinitionsValueMetadata : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (DisplayName != null)
 20            {
 021                writer.WritePropertyName("displayName");
 022                writer.WriteStringValue(DisplayName);
 23            }
 024            if (Description != null)
 25            {
 026                writer.WritePropertyName("description");
 027                writer.WriteStringValue(Description);
 28            }
 029            foreach (var item in AdditionalProperties)
 30            {
 031                writer.WritePropertyName(item.Key);
 032                writer.WriteObjectValue(item.Value);
 33            }
 034            writer.WriteEndObject();
 035        }
 36
 37        internal static ParameterDefinitionsValueMetadata DeserializeParameterDefinitionsValueMetadata(JsonElement eleme
 38        {
 6401639            string displayName = default;
 6401640            string description = default;
 6401641            IDictionary<string, object> additionalProperties = default;
 6401642            Dictionary<string, object> additionalPropertiesDictionary = default;
 39622443            foreach (var property in element.EnumerateObject())
 44            {
 13409645                if (property.NameEquals("displayName"))
 46                {
 6401647                    if (property.Value.ValueKind == JsonValueKind.Null)
 48                    {
 49                        continue;
 50                    }
 6401651                    displayName = property.Value.GetString();
 6401652                    continue;
 53                }
 7008054                if (property.NameEquals("description"))
 55                {
 6318056                    if (property.Value.ValueKind == JsonValueKind.Null)
 57                    {
 58                        continue;
 59                    }
 6318060                    description = property.Value.GetString();
 6318061                    continue;
 62                }
 690063                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 690064                if (property.Value.ValueKind == JsonValueKind.Null)
 65                {
 066                    additionalPropertiesDictionary.Add(property.Name, null);
 67                }
 68                else
 69                {
 690070                    additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 71                }
 72            }
 6401673            additionalProperties = additionalPropertiesDictionary;
 6401674            return new ParameterDefinitionsValueMetadata(displayName, description, additionalProperties);
 75        }
 76    }
 77}