< Summary

Class:Azure.ResourceManager.Resources.Models.TemplateHashResult
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TemplateHashResult.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TemplateHashResult.Serialization.cs
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:75
Line coverage:0% (0 of 19)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_MinifiedTemplate()-0%100%
get_TemplateHash()-0%100%
DeserializeTemplateHashResult(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TemplateHashResult.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.Resources.Models
 9{
 10    /// <summary> Result of the request to calculate template hash. It contains a string of minified template and its ha
 11    public partial class TemplateHashResult
 12    {
 13        /// <summary> Initializes a new instance of TemplateHashResult. </summary>
 014        internal TemplateHashResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of TemplateHashResult. </summary>
 19        /// <param name="minifiedTemplate"> The minified template string. </param>
 20        /// <param name="templateHash"> The template hash. </param>
 021        internal TemplateHashResult(string minifiedTemplate, string templateHash)
 22        {
 023            MinifiedTemplate = minifiedTemplate;
 024            TemplateHash = templateHash;
 025        }
 26
 27        /// <summary> The minified template string. </summary>
 028        public string MinifiedTemplate { get; }
 29        /// <summary> The template hash. </summary>
 030        public string TemplateHash { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TemplateHashResult.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.Resources.Models
 12{
 13    public partial class TemplateHashResult
 14    {
 15        internal static TemplateHashResult DeserializeTemplateHashResult(JsonElement element)
 16        {
 017            string minifiedTemplate = default;
 018            string templateHash = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("minifiedTemplate"))
 22                {
 023                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 027                    minifiedTemplate = property.Value.GetString();
 028                    continue;
 29                }
 030                if (property.NameEquals("templateHash"))
 31                {
 032                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 036                    templateHash = property.Value.GetString();
 37                    continue;
 38                }
 39            }
 040            return new TemplateHashResult(minifiedTemplate, templateHash);
 41        }
 42    }
 43}