< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.AppEventTypeDetail
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppEventTypeDetail.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppEventTypeDetail.Serialization.cs
Covered lines:8
Uncovered lines:3
Coverable lines:11
Total lines:57
Line coverage:72.7% (8 of 11)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Action()-0%100%
DeserializeAppEventTypeDetail(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppEventTypeDetail.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.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> Detail of action on the app. </summary>
 11    public partial class AppEventTypeDetail
 12    {
 13        /// <summary> Initializes a new instance of AppEventTypeDetail. </summary>
 014        internal AppEventTypeDetail()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of AppEventTypeDetail. </summary>
 19        /// <param name="action"> Type of action of the operation. </param>
 2420        internal AppEventTypeDetail(AppAction? action)
 21        {
 2422            Action = action;
 2423        }
 24
 25        /// <summary> Type of action of the operation. </summary>
 026        public AppAction? Action { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\AppEventTypeDetail.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.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class AppEventTypeDetail
 14    {
 15        internal static AppEventTypeDetail DeserializeAppEventTypeDetail(JsonElement element)
 16        {
 2417            Optional<AppAction> action = default;
 9618            foreach (var property in element.EnumerateObject())
 19            {
 2420                if (property.NameEquals("action"))
 21                {
 2422                    action = new AppAction(property.Value.GetString());
 23                    continue;
 24                }
 25            }
 2426            return new AppEventTypeDetail(Optional.ToNullable(action));
 27        }
 28    }
 29}