< Summary

Class:Azure.ResourceManager.Compute.Models.UpdateResource
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpdateResource.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpdateResource.Serialization.cs
Covered lines:3
Uncovered lines:13
Coverable lines:16
Total lines:62
Line coverage:18.7% (3 of 16)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpdateResource.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;
 9
 10namespace Azure.ResourceManager.Compute.Models
 11{
 12    /// <summary> The Update Resource model definition. </summary>
 13    public partial class UpdateResource
 14    {
 15        /// <summary> Initializes a new instance of UpdateResource. </summary>
 1616        public UpdateResource()
 17        {
 1618        }
 19
 20        /// <summary> Initializes a new instance of UpdateResource. </summary>
 21        /// <param name="tags"> Resource tags. </param>
 022        internal UpdateResource(IDictionary<string, string> tags)
 23        {
 024            Tags = tags;
 025        }
 26
 27        /// <summary> Resource tags. </summary>
 8028        public IDictionary<string, string> Tags { get; set; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpdateResource.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.Compute.Models
 12{
 13    public partial class UpdateResource : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Tags != null)
 19            {
 020                writer.WritePropertyName("tags");
 021                writer.WriteStartObject();
 022                foreach (var item in Tags)
 23                {
 024                    writer.WritePropertyName(item.Key);
 025                    writer.WriteStringValue(item.Value);
 26                }
 027                writer.WriteEndObject();
 28            }
 029            writer.WriteEndObject();
 030        }
 31    }
 32}