< Summary

Class:Azure.ResourceManager.Network.Models.PcStatus
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PcStatus.cs
Covered lines:3
Uncovered lines:11
Coverable lines:14
Total lines:59
Line coverage:21.4% (3 of 14)
Covered branches:1
Total branches:6
Branch coverage:16.6% (1 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%50%
get_NotStarted()-0%100%
get_Running()-0%100%
get_Stopped()-0%100%
get_Error()-0%100%
get_Unknown()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-0%100%
Equals(...)-0%0%
Equals(...)-0%100%
GetHashCode()-0%0%
ToString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\PcStatus.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.ResourceManager.Network.Models
 12{
 13    /// <summary> The status of the packet capture session. </summary>
 14    public readonly partial struct PcStatus : IEquatable<PcStatus>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="PcStatus"/> values are the same. </summary>
 19        public PcStatus(string value)
 20        {
 821            _value = value ?? throw new ArgumentNullException(nameof(value));
 822        }
 23
 24        private const string NotStartedValue = "NotStarted";
 25        private const string RunningValue = "Running";
 26        private const string StoppedValue = "Stopped";
 27        private const string ErrorValue = "Error";
 28        private const string UnknownValue = "Unknown";
 29
 30        /// <summary> NotStarted. </summary>
 031        public static PcStatus NotStarted { get; } = new PcStatus(NotStartedValue);
 32        /// <summary> Running. </summary>
 033        public static PcStatus Running { get; } = new PcStatus(RunningValue);
 34        /// <summary> Stopped. </summary>
 035        public static PcStatus Stopped { get; } = new PcStatus(StoppedValue);
 36        /// <summary> Error. </summary>
 037        public static PcStatus Error { get; } = new PcStatus(ErrorValue);
 38        /// <summary> Unknown. </summary>
 039        public static PcStatus Unknown { get; } = new PcStatus(UnknownValue);
 40        /// <summary> Determines if two <see cref="PcStatus"/> values are the same. </summary>
 041        public static bool operator ==(PcStatus left, PcStatus right) => left.Equals(right);
 42        /// <summary> Determines if two <see cref="PcStatus"/> values are not the same. </summary>
 043        public static bool operator !=(PcStatus left, PcStatus right) => !left.Equals(right);
 44        /// <summary> Converts a string to a <see cref="PcStatus"/>. </summary>
 045        public static implicit operator PcStatus(string value) => new PcStatus(value);
 46
 47        /// <inheritdoc />
 48        [EditorBrowsable(EditorBrowsableState.Never)]
 049        public override bool Equals(object obj) => obj is PcStatus other && Equals(other);
 50        /// <inheritdoc />
 051        public bool Equals(PcStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnor
 52
 53        /// <inheritdoc />
 54        [EditorBrowsable(EditorBrowsableState.Never)]
 055        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 56        /// <inheritdoc />
 457        public override string ToString() => _value;
 58    }
 59}