< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.ContainerRegistryEventActor
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryEventActor.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryEventActor.Serialization.cs
Covered lines:9
Uncovered lines:2
Coverable lines:11
Total lines:57
Line coverage:81.8% (9 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_Name()-100%100%
DeserializeContainerRegistryEventActor(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryEventActor.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> The agent that initiated the event. For most situations, this could be from the authorization context 
 11    public partial class ContainerRegistryEventActor
 12    {
 13        /// <summary> Initializes a new instance of ContainerRegistryEventActor. </summary>
 014        internal ContainerRegistryEventActor()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ContainerRegistryEventActor. </summary>
 19        /// <param name="name"> The subject or username associated with the request context that generated the event. </
 420        internal ContainerRegistryEventActor(string name)
 21        {
 422            Name = name;
 423        }
 24
 25        /// <summary> The subject or username associated with the request context that generated the event. </summary>
 226        public string Name { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\ContainerRegistryEventActor.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 ContainerRegistryEventActor
 14    {
 15        internal static ContainerRegistryEventActor DeserializeContainerRegistryEventActor(JsonElement element)
 16        {
 417            Optional<string> name = default;
 1618            foreach (var property in element.EnumerateObject())
 19            {
 420                if (property.NameEquals("name"))
 21                {
 422                    name = property.Value.GetString();
 23                    continue;
 24                }
 25            }
 426            return new ContainerRegistryEventActor(name.Value);
 27        }
 28    }
 29}