< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionConnectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionConnectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionConnectedEventData.Serialization.cs
Covered lines:0
Uncovered lines:29
Coverable lines:29
Total lines:90
Line coverage:0% (0 of 29)
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_Timestamp()-0%100%
get_HubName()-0%100%
get_ConnectionId()-0%100%
get_UserId()-0%100%
DeserializeSignalRServiceClientConnectionConnectedEventData(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionConnectedEventData.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;
 9
 10namespace Azure.Messaging.EventGrid.SystemEvents
 11{
 12    /// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.SignalRService.ClientConnectionConnec
 13    public partial class SignalRServiceClientConnectionConnectedEventData
 14    {
 15        /// <summary> Initializes a new instance of SignalRServiceClientConnectionConnectedEventData. </summary>
 016        internal SignalRServiceClientConnectionConnectedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of SignalRServiceClientConnectionConnectedEventData. </summary>
 21        /// <param name="timestamp"> The time at which the event occurred. </param>
 22        /// <param name="hubName"> The hub of connected client connection. </param>
 23        /// <param name="connectionId"> The connection Id of connected client connection. </param>
 24        /// <param name="userId"> The user Id of connected client connection. </param>
 025        internal SignalRServiceClientConnectionConnectedEventData(DateTimeOffset? timestamp, string hubName, string conn
 26        {
 027            Timestamp = timestamp;
 028            HubName = hubName;
 029            ConnectionId = connectionId;
 030            UserId = userId;
 031        }
 32
 33        /// <summary> The time at which the event occurred. </summary>
 034        public DateTimeOffset? Timestamp { get; }
 35        /// <summary> The hub of connected client connection. </summary>
 036        public string HubName { get; }
 37        /// <summary> The connection Id of connected client connection. </summary>
 038        public string ConnectionId { get; }
 39        /// <summary> The user Id of connected client connection. </summary>
 040        public string UserId { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionConnectedEventData.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;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Messaging.EventGrid.SystemEvents
 13{
 14    public partial class SignalRServiceClientConnectionConnectedEventData
 15    {
 16        internal static SignalRServiceClientConnectionConnectedEventData DeserializeSignalRServiceClientConnectionConnec
 17        {
 018            Optional<DateTimeOffset> timestamp = default;
 019            Optional<string> hubName = default;
 020            Optional<string> connectionId = default;
 021            Optional<string> userId = default;
 022            foreach (var property in element.EnumerateObject())
 23            {
 024                if (property.NameEquals("timestamp"))
 25                {
 026                    timestamp = property.Value.GetDateTimeOffset("O");
 027                    continue;
 28                }
 029                if (property.NameEquals("hubName"))
 30                {
 031                    hubName = property.Value.GetString();
 032                    continue;
 33                }
 034                if (property.NameEquals("connectionId"))
 35                {
 036                    connectionId = property.Value.GetString();
 037                    continue;
 38                }
 039                if (property.NameEquals("userId"))
 40                {
 041                    userId = property.Value.GetString();
 42                    continue;
 43                }
 44            }
 045            return new SignalRServiceClientConnectionConnectedEventData(Optional.ToNullable(timestamp), hubName.Value, c
 46        }
 47    }
 48}