< Summary

Class:Azure.ResourceManager.Storage.Models.CorsRuleAllowedMethodsItem
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\CorsRuleAllowedMethodsItem.cs
Covered lines:5
Uncovered lines:11
Coverable lines:16
Total lines:65
Line coverage:31.2% (5 of 16)
Covered branches:1
Total branches:6
Branch coverage:16.6% (1 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%50%
get_Delete()-0%100%
get_GET()-0%100%
get_Head()-0%100%
get_Merge()-0%100%
get_Post()-0%100%
get_Options()-0%100%
get_PUT()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
op_Implicit(...)-100%100%
Equals(...)-0%0%
Equals(...)-100%100%
GetHashCode()-0%0%
ToString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\CorsRuleAllowedMethodsItem.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.Storage.Models
 12{
 13    /// <summary> The CorsRuleAllowedMethodsItem. </summary>
 14    public readonly partial struct CorsRuleAllowedMethodsItem : IEquatable<CorsRuleAllowedMethodsItem>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="CorsRuleAllowedMethodsItem"/> values are the same. </summary>
 19        public CorsRuleAllowedMethodsItem(string value)
 20        {
 24021            _value = value ?? throw new ArgumentNullException(nameof(value));
 24022        }
 23
 24        private const string DeleteValue = "DELETE";
 25        private const string GETValue = "GET";
 26        private const string HeadValue = "HEAD";
 27        private const string MergeValue = "MERGE";
 28        private const string PostValue = "POST";
 29        private const string OptionsValue = "OPTIONS";
 30        private const string PUTValue = "PUT";
 31
 32        /// <summary> DELETE. </summary>
 033        public static CorsRuleAllowedMethodsItem Delete { get; } = new CorsRuleAllowedMethodsItem(DeleteValue);
 34        /// <summary> GET. </summary>
 035        public static CorsRuleAllowedMethodsItem GET { get; } = new CorsRuleAllowedMethodsItem(GETValue);
 36        /// <summary> HEAD. </summary>
 037        public static CorsRuleAllowedMethodsItem Head { get; } = new CorsRuleAllowedMethodsItem(HeadValue);
 38        /// <summary> MERGE. </summary>
 039        public static CorsRuleAllowedMethodsItem Merge { get; } = new CorsRuleAllowedMethodsItem(MergeValue);
 40        /// <summary> POST. </summary>
 041        public static CorsRuleAllowedMethodsItem Post { get; } = new CorsRuleAllowedMethodsItem(PostValue);
 42        /// <summary> OPTIONS. </summary>
 043        public static CorsRuleAllowedMethodsItem Options { get; } = new CorsRuleAllowedMethodsItem(OptionsValue);
 44        /// <summary> PUT. </summary>
 045        public static CorsRuleAllowedMethodsItem PUT { get; } = new CorsRuleAllowedMethodsItem(PUTValue);
 46        /// <summary> Determines if two <see cref="CorsRuleAllowedMethodsItem"/> values are the same. </summary>
 047        public static bool operator ==(CorsRuleAllowedMethodsItem left, CorsRuleAllowedMethodsItem right) => left.Equals
 48        /// <summary> Determines if two <see cref="CorsRuleAllowedMethodsItem"/> values are not the same. </summary>
 049        public static bool operator !=(CorsRuleAllowedMethodsItem left, CorsRuleAllowedMethodsItem right) => !left.Equal
 50        /// <summary> Converts a string to a <see cref="CorsRuleAllowedMethodsItem"/>. </summary>
 8051        public static implicit operator CorsRuleAllowedMethodsItem(string value) => new CorsRuleAllowedMethodsItem(value
 52
 53        /// <inheritdoc />
 54        [EditorBrowsable(EditorBrowsableState.Never)]
 055        public override bool Equals(object obj) => obj is CorsRuleAllowedMethodsItem other && Equals(other);
 56        /// <inheritdoc />
 16057        public bool Equals(CorsRuleAllowedMethodsItem other) => string.Equals(_value, other._value, StringComparison.Inv
 58
 59        /// <inheritdoc />
 60        [EditorBrowsable(EditorBrowsableState.Never)]
 061        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 62        /// <inheritdoc />
 8063        public override string ToString() => _value;
 64    }
 65}