< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%50%
get_None()-0%100%
get_DHGroup1()-0%100%
get_DHGroup2()-100%100%
get_DHGroup14()-0%100%
get_DHGroup2048()-100%100%
get_ECP256()-0%100%
get_ECP384()-0%100%
get_DHGroup24()-0%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\DhGroup.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 DH Groups used in IKE Phase 1 for initial SA. </summary>
 14    public readonly partial struct DhGroup : IEquatable<DhGroup>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="DhGroup"/> values are the same. </summary>
 19        public DhGroup(string value)
 20        {
 3221            _value = value ?? throw new ArgumentNullException(nameof(value));
 3222        }
 23
 24        private const string NoneValue = "None";
 25        private const string DHGroup1Value = "DHGroup1";
 26        private const string DHGroup2Value = "DHGroup2";
 27        private const string DHGroup14Value = "DHGroup14";
 28        private const string DHGroup2048Value = "DHGroup2048";
 29        private const string ECP256Value = "ECP256";
 30        private const string ECP384Value = "ECP384";
 31        private const string DHGroup24Value = "DHGroup24";
 32
 33        /// <summary> None. </summary>
 034        public static DhGroup None { get; } = new DhGroup(NoneValue);
 35        /// <summary> DHGroup1. </summary>
 036        public static DhGroup DHGroup1 { get; } = new DhGroup(DHGroup1Value);
 37        /// <summary> DHGroup2. </summary>
 638        public static DhGroup DHGroup2 { get; } = new DhGroup(DHGroup2Value);
 39        /// <summary> DHGroup14. </summary>
 040        public static DhGroup DHGroup14 { get; } = new DhGroup(DHGroup14Value);
 41        /// <summary> DHGroup2048. </summary>
 642        public static DhGroup DHGroup2048 { get; } = new DhGroup(DHGroup2048Value);
 43        /// <summary> ECP256. </summary>
 044        public static DhGroup ECP256 { get; } = new DhGroup(ECP256Value);
 45        /// <summary> ECP384. </summary>
 046        public static DhGroup ECP384 { get; } = new DhGroup(ECP384Value);
 47        /// <summary> DHGroup24. </summary>
 048        public static DhGroup DHGroup24 { get; } = new DhGroup(DHGroup24Value);
 49        /// <summary> Determines if two <see cref="DhGroup"/> values are the same. </summary>
 050        public static bool operator ==(DhGroup left, DhGroup right) => left.Equals(right);
 51        /// <summary> Determines if two <see cref="DhGroup"/> values are not the same. </summary>
 052        public static bool operator !=(DhGroup left, DhGroup right) => !left.Equals(right);
 53        /// <summary> Converts a string to a <see cref="DhGroup"/>. </summary>
 054        public static implicit operator DhGroup(string value) => new DhGroup(value);
 55
 56        /// <inheritdoc />
 57        [EditorBrowsable(EditorBrowsableState.Never)]
 058        public override bool Equals(object obj) => obj is DhGroup other && Equals(other);
 59        /// <inheritdoc />
 860        public bool Equals(DhGroup other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnore
 61
 62        /// <inheritdoc />
 63        [EditorBrowsable(EditorBrowsableState.Never)]
 064        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 65        /// <inheritdoc />
 1666        public override string ToString() => _value;
 67    }
 68}