< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.SignalRServiceClientConnectionDisconnectedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionDisconnectedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionDisconnectedEventData.Serialization.cs
Covered lines:0
Uncovered lines:35
Coverable lines:35
Total lines:100
Line coverage:0% (0 of 35)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

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%
get_ErrorMessage()-0%100%
DeserializeSignalRServiceClientConnectionDisconnectedEventData(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionDisconnectedEventData.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.ClientConnectionDiscon
 13    public partial class SignalRServiceClientConnectionDisconnectedEventData
 14    {
 15        /// <summary> Initializes a new instance of SignalRServiceClientConnectionDisconnectedEventData. </summary>
 016        internal SignalRServiceClientConnectionDisconnectedEventData()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of SignalRServiceClientConnectionDisconnectedEventData. </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>
 25        /// <param name="errorMessage"> The message of error that cause the client connection disconnected. </param>
 026        internal SignalRServiceClientConnectionDisconnectedEventData(DateTimeOffset? timestamp, string hubName, string c
 27        {
 028            Timestamp = timestamp;
 029            HubName = hubName;
 030            ConnectionId = connectionId;
 031            UserId = userId;
 032            ErrorMessage = errorMessage;
 033        }
 34
 35        /// <summary> The time at which the event occurred. </summary>
 036        public DateTimeOffset? Timestamp { get; }
 37        /// <summary> The hub of connected client connection. </summary>
 038        public string HubName { get; }
 39        /// <summary> The connection Id of connected client connection. </summary>
 040        public string ConnectionId { get; }
 41        /// <summary> The user Id of connected client connection. </summary>
 042        public string UserId { get; }
 43        /// <summary> The message of error that cause the client connection disconnected. </summary>
 044        public string ErrorMessage { get; }
 45    }
 46}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SignalRServiceClientConnectionDisconnectedEventData.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 SignalRServiceClientConnectionDisconnectedEventData
 15    {
 16        internal static SignalRServiceClientConnectionDisconnectedEventData DeserializeSignalRServiceClientConnectionDis
 17        {
 018            Optional<DateTimeOffset> timestamp = default;
 019            Optional<string> hubName = default;
 020            Optional<string> connectionId = default;
 021            Optional<string> userId = default;
 022            Optional<string> errorMessage = default;
 023            foreach (var property in element.EnumerateObject())
 24            {
 025                if (property.NameEquals("timestamp"))
 26                {
 027                    timestamp = property.Value.GetDateTimeOffset("O");
 028                    continue;
 29                }
 030                if (property.NameEquals("hubName"))
 31                {
 032                    hubName = property.Value.GetString();
 033                    continue;
 34                }
 035                if (property.NameEquals("connectionId"))
 36                {
 037                    connectionId = property.Value.GetString();
 038                    continue;
 39                }
 040                if (property.NameEquals("userId"))
 41                {
 042                    userId = property.Value.GetString();
 043                    continue;
 44                }
 045                if (property.NameEquals("errorMessage"))
 46                {
 047                    errorMessage = property.Value.GetString();
 48                    continue;
 49                }
 50            }
 051            return new SignalRServiceClientConnectionDisconnectedEventData(Optional.ToNullable(timestamp), hubName.Value
 52        }
 53    }
 54}