< Summary

Class:Azure.ResourceManager.DigitalTwins.Models.Operation
Assembly:Azure.ResourceManager.DigitalTwins
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\Operation.cs
C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\Operation.Serialization.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:67
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\Operation.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.DigitalTwins.Models
 9{
 10    /// <summary> DigitalTwins service REST API operation. </summary>
 11    public partial class Operation
 12    {
 13        /// <summary> Initializes a new instance of Operation. </summary>
 014        internal Operation()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of Operation. </summary>
 19        /// <param name="name"> Operation name: {provider}/{resource}/{read | write | action | delete}. </param>
 20        /// <param name="display"> Operation properties display. </param>
 021        internal Operation(string name, OperationDisplay display)
 22        {
 023            Name = name;
 024            Display = display;
 025        }
 26
 27        /// <summary> Operation name: {provider}/{resource}/{read | write | action | delete}. </summary>
 028        public string Name { get; }
 29        /// <summary> Operation properties display. </summary>
 030        public OperationDisplay Display { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\Operation.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.DigitalTwins.Models
 12{
 13    public partial class Operation
 14    {
 15        internal static Operation DeserializeOperation(JsonElement element)
 16        {
 017            Optional<string> name = default;
 018            Optional<OperationDisplay> display = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("name"))
 22                {
 023                    name = property.Value.GetString();
 024                    continue;
 25                }
 026                if (property.NameEquals("display"))
 27                {
 028                    display = OperationDisplay.DeserializeOperationDisplay(property.Value);
 29                    continue;
 30                }
 31            }
 032            return new Operation(name.Value, display.Value);
 33        }
 34    }
 35}