< Summary

Class:Azure.Analytics.Synapse.Spark.Models.SparkErrorSource
Assembly:Azure.Analytics.Synapse.Spark
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Customization\Models\ErrorSource.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkErrorSource.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:78
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_SystemError()-0%100%
get_UserError()-0%100%
get_UnknownError()-0%100%
get_DependencyError()-0%100%
Equals(...)-0%0%
Equals(...)-0%100%
GetHashCode()-0%0%
ToString()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Customization\Models\ErrorSource.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Core;
 5using System;
 6
 7namespace Azure.Analytics.Synapse.Spark.Models
 8{
 9    /// <summary> The ErrorSource. </summary>
 10    [CodeGenModel("SparkErrorSource")]
 11    public readonly partial struct SparkErrorSource : IEquatable<SparkErrorSource>
 12    {
 13        /// <summary> Determines if two <see cref="SparkErrorSource"/> values are the same. </summary>
 14        public SparkErrorSource(string value)
 15        {
 016            _value = value ?? throw new ArgumentNullException(nameof(value));
 017        }
 18
 19        private const string SystemValue = "System";
 20        private const string UserValue = "User";
 21        private const string UnknownValue = "Unknown";
 22        private const string DependencyValue = "Dependency";
 23
 24        /// <summary> System. </summary>
 25        [CodeGenMember("System")]
 026        public static SparkErrorSource SystemError { get; } = new SparkErrorSource(SystemValue);
 27        /// <summary> User. </summary>
 28        [CodeGenMember("User")]
 029        public static SparkErrorSource UserError { get; } = new SparkErrorSource(UserValue);
 30        /// <summary> Unknown. </summary>
 31        [CodeGenMember("Unknown")]
 032        public static SparkErrorSource UnknownError { get; } = new SparkErrorSource(UnknownValue);
 33        /// <summary> Dependency. </summary>
 34        [CodeGenMember("Dependency")]
 035        public static SparkErrorSource DependencyError { get; } = new SparkErrorSource(DependencyValue);
 36
 37        /// <inheritdoc />
 38        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
 039        public override bool Equals(object obj) => obj is SparkErrorSource other && Equals(other);
 40        /// <inheritdoc />
 041        public bool Equals(SparkErrorSource other) => string.Equals(_value, other._value, System.StringComparison.Ordina
 42
 43        /// <inheritdoc />
 44        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
 045        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 46        /// <inheritdoc />
 047        public override string ToString() => _value;
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkErrorSource.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.ComponentModel;
 10
 11namespace Azure.Analytics.Synapse.Spark.Models
 12{
 13    /// <summary> The SparkErrorSource. </summary>
 14    public readonly partial struct SparkErrorSource : IEquatable<SparkErrorSource>
 15    {
 16        private readonly string _value;
 17
 18        private const string SystemErrorValue = "System";
 19        private const string UserErrorValue = "User";
 20        private const string UnknownErrorValue = "Unknown";
 21        private const string DependencyErrorValue = "Dependency";
 22        /// <summary> Determines if two <see cref="SparkErrorSource"/> values are the same. </summary>
 023        public static bool operator ==(SparkErrorSource left, SparkErrorSource right) => left.Equals(right);
 24        /// <summary> Determines if two <see cref="SparkErrorSource"/> values are not the same. </summary>
 025        public static bool operator !=(SparkErrorSource left, SparkErrorSource right) => !left.Equals(right);
 26        /// <summary> Converts a string to a <see cref="SparkErrorSource"/>. </summary>
 027        public static implicit operator SparkErrorSource(string value) => new SparkErrorSource(value);
 28    }
 29}