< Summary

Class:Azure.ResourceManager.Network.Models.RouteNextHopType
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RouteNextHopType.cs
Covered lines:8
Uncovered lines:6
Coverable lines:14
Total lines:59
Line coverage:57.1% (8 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_VirtualNetworkGateway()-0%100%
get_VnetLocal()-100%100%
get_Internet()-100%100%
get_VirtualAppliance()-100%100%
get_None()-100%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-0%100%
Equals(...)-0%0%
Equals(...)-100%100%
GetHashCode()-0%0%
ToString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RouteNextHopType.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 type of Azure hop the packet should be sent to. </summary>
 14    public readonly partial struct RouteNextHopType : IEquatable<RouteNextHopType>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="RouteNextHopType"/> values are the same. </summary>
 19        public RouteNextHopType(string value)
 20        {
 10621            _value = value ?? throw new ArgumentNullException(nameof(value));
 10622        }
 23
 24        private const string VirtualNetworkGatewayValue = "VirtualNetworkGateway";
 25        private const string VnetLocalValue = "VnetLocal";
 26        private const string InternetValue = "Internet";
 27        private const string VirtualApplianceValue = "VirtualAppliance";
 28        private const string NoneValue = "None";
 29
 30        /// <summary> VirtualNetworkGateway. </summary>
 031        public static RouteNextHopType VirtualNetworkGateway { get; } = new RouteNextHopType(VirtualNetworkGatewayValue)
 32        /// <summary> VnetLocal. </summary>
 3033        public static RouteNextHopType VnetLocal { get; } = new RouteNextHopType(VnetLocalValue);
 34        /// <summary> Internet. </summary>
 1035        public static RouteNextHopType Internet { get; } = new RouteNextHopType(InternetValue);
 36        /// <summary> VirtualAppliance. </summary>
 3037        public static RouteNextHopType VirtualAppliance { get; } = new RouteNextHopType(VirtualApplianceValue);
 38        /// <summary> None. </summary>
 1039        public static RouteNextHopType None { get; } = new RouteNextHopType(NoneValue);
 40        /// <summary> Determines if two <see cref="RouteNextHopType"/> values are the same. </summary>
 041        public static bool operator ==(RouteNextHopType left, RouteNextHopType right) => left.Equals(right);
 42        /// <summary> Determines if two <see cref="RouteNextHopType"/> values are not the same. </summary>
 043        public static bool operator !=(RouteNextHopType left, RouteNextHopType right) => !left.Equals(right);
 44        /// <summary> Converts a string to a <see cref="RouteNextHopType"/>. </summary>
 045        public static implicit operator RouteNextHopType(string value) => new RouteNextHopType(value);
 46
 47        /// <inheritdoc />
 48        [EditorBrowsable(EditorBrowsableState.Never)]
 049        public override bool Equals(object obj) => obj is RouteNextHopType other && Equals(other);
 50        /// <inheritdoc />
 5651        public bool Equals(RouteNextHopType other) => string.Equals(_value, other._value, StringComparison.InvariantCult
 52
 53        /// <inheritdoc />
 54        [EditorBrowsable(EditorBrowsableState.Never)]
 055        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 56        /// <inheritdoc />
 8857        public override string ToString() => _value;
 58    }
 59}