< Summary

Class:Azure.Data.Tables.Models.TableServiceError
Assembly:Azure.Data.Tables
File(s):C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableServiceError.cs
C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableServiceError.Serialization.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:68
Line coverage:0% (0 of 15)
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_Message()-0%100%
DeserializeTableServiceError(...)-0%0%
DeserializeTableServiceError(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableServiceError.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.Data.Tables.Models
 9{
 10    /// <summary> Table Service error. </summary>
 11    internal partial class TableServiceError
 12    {
 13        /// <summary> Initializes a new instance of TableServiceError. </summary>
 014        internal TableServiceError()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of TableServiceError. </summary>
 19        /// <param name="message"> The error message. </param>
 020        internal TableServiceError(string message)
 21        {
 022            Message = message;
 023        }
 24
 25        /// <summary> The error message. </summary>
 026        public string Message { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableServiceError.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 System.Xml.Linq;
 10using Azure.Core;
 11
 12namespace Azure.Data.Tables.Models
 13{
 14    internal partial class TableServiceError
 15    {
 16        internal static TableServiceError DeserializeTableServiceError(JsonElement element)
 17        {
 018            Optional<string> message = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("Message"))
 22                {
 023                    message = property.Value.GetString();
 24                    continue;
 25                }
 26            }
 027            return new TableServiceError(message.Value);
 28        }
 29
 30        internal static TableServiceError DeserializeTableServiceError(XElement element)
 31        {
 032            string message = default;
 033            if (element.Element("Message") is XElement messageElement)
 34            {
 035                message = (string)messageElement;
 36            }
 037            return new TableServiceError(message);
 38        }
 39    }
 40}