< Summary

Class:Azure.ResourceManager.Resources.Models.ParameterType
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ParameterType.cs
Covered lines:4
Uncovered lines:12
Coverable lines:16
Total lines:65
Line coverage:25% (4 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_String()-100%100%
get_Array()-0%100%
get_Object()-0%100%
get_Boolean()-0%100%
get_Integer()-0%100%
get_Float()-0%100%
get_DateTime()-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\resources\Azure.ResourceManager.Resources\src\Generated\Models\ParameterType.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.Resources.Models
 12{
 13    /// <summary> The data type of the parameter. </summary>
 14    public readonly partial struct ParameterType : IEquatable<ParameterType>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="ParameterType"/> values are the same. </summary>
 19        public ParameterType(string value)
 20        {
 6405021            _value = value ?? throw new ArgumentNullException(nameof(value));
 6405022        }
 23
 24        private const string StringValue = "String";
 25        private const string ArrayValue = "Array";
 26        private const string ObjectValue = "Object";
 27        private const string BooleanValue = "Boolean";
 28        private const string IntegerValue = "Integer";
 29        private const string FloatValue = "Float";
 30        private const string DateTimeValue = "DateTime";
 31
 32        /// <summary> String. </summary>
 833        public static ParameterType String { get; } = new ParameterType(StringValue);
 34        /// <summary> Array. </summary>
 035        public static ParameterType Array { get; } = new ParameterType(ArrayValue);
 36        /// <summary> Object. </summary>
 037        public static ParameterType Object { get; } = new ParameterType(ObjectValue);
 38        /// <summary> Boolean. </summary>
 039        public static ParameterType Boolean { get; } = new ParameterType(BooleanValue);
 40        /// <summary> Integer. </summary>
 041        public static ParameterType Integer { get; } = new ParameterType(IntegerValue);
 42        /// <summary> Float. </summary>
 043        public static ParameterType Float { get; } = new ParameterType(FloatValue);
 44        /// <summary> DateTime. </summary>
 045        public static ParameterType DateTime { get; } = new ParameterType(DateTimeValue);
 46        /// <summary> Determines if two <see cref="ParameterType"/> values are the same. </summary>
 047        public static bool operator ==(ParameterType left, ParameterType right) => left.Equals(right);
 48        /// <summary> Determines if two <see cref="ParameterType"/> values are not the same. </summary>
 049        public static bool operator !=(ParameterType left, ParameterType right) => !left.Equals(right);
 50        /// <summary> Converts a string to a <see cref="ParameterType"/>. </summary>
 051        public static implicit operator ParameterType(string value) => new ParameterType(value);
 52
 53        /// <inheritdoc />
 54        [EditorBrowsable(EditorBrowsableState.Never)]
 055        public override bool Equals(object obj) => obj is ParameterType other && Equals(other);
 56        /// <inheritdoc />
 057        public bool Equals(ParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCulture
 58
 59        /// <inheritdoc />
 60        [EditorBrowsable(EditorBrowsableState.Never)]
 061        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 62        /// <inheritdoc />
 2063        public override string ToString() => _value;
 64    }
 65}