< Summary

Class:Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerDataSourceType.cs
Covered lines:6
Uncovered lines:8
Coverable lines:14
Total lines:60
Line coverage:42.8% (6 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_AzureSql()-0%100%
get_CosmosDb()-0%100%
get_AzureBlob()-100%100%
get_AzureTable()-0%100%
get_MySql()-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-100%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\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerDataSourceType.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.Search.Documents.Indexes.Models
 12{
 13    /// <summary> Defines the type of a datasource. </summary>
 14    public readonly partial struct SearchIndexerDataSourceType : IEquatable<SearchIndexerDataSourceType>
 15    {
 16        private readonly string _value;
 17
 18        /// <summary> Determines if two <see cref="SearchIndexerDataSourceType"/> values are the same. </summary>
 19        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
 20        public SearchIndexerDataSourceType(string value)
 21        {
 1422            _value = value ?? throw new ArgumentNullException(nameof(value));
 1423        }
 24
 25        private const string AzureSqlValue = "azuresql";
 26        private const string CosmosDbValue = "cosmosdb";
 27        private const string AzureBlobValue = "azureblob";
 28        private const string AzureTableValue = "azuretable";
 29        private const string MySqlValue = "mysql";
 30
 31        /// <summary> Indicates an Azure SQL datasource. </summary>
 032        public static SearchIndexerDataSourceType AzureSql { get; } = new SearchIndexerDataSourceType(AzureSqlValue);
 33        /// <summary> Indicates a CosmosDB datasource. </summary>
 034        public static SearchIndexerDataSourceType CosmosDb { get; } = new SearchIndexerDataSourceType(CosmosDbValue);
 35        /// <summary> Indicates a Azure Blob datasource. </summary>
 936        public static SearchIndexerDataSourceType AzureBlob { get; } = new SearchIndexerDataSourceType(AzureBlobValue);
 37        /// <summary> Indicates a Azure Table datasource. </summary>
 038        public static SearchIndexerDataSourceType AzureTable { get; } = new SearchIndexerDataSourceType(AzureTableValue)
 39        /// <summary> Indicates a MySql datasource. </summary>
 040        public static SearchIndexerDataSourceType MySql { get; } = new SearchIndexerDataSourceType(MySqlValue);
 41        /// <summary> Determines if two <see cref="SearchIndexerDataSourceType"/> values are the same. </summary>
 042        public static bool operator ==(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => left.Equa
 43        /// <summary> Determines if two <see cref="SearchIndexerDataSourceType"/> values are not the same. </summary>
 644        public static bool operator !=(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => !left.Equ
 45        /// <summary> Converts a string to a <see cref="SearchIndexerDataSourceType"/>. </summary>
 046        public static implicit operator SearchIndexerDataSourceType(string value) => new SearchIndexerDataSourceType(val
 47
 48        /// <inheritdoc />
 49        [EditorBrowsable(EditorBrowsableState.Never)]
 050        public override bool Equals(object obj) => obj is SearchIndexerDataSourceType other && Equals(other);
 51        /// <inheritdoc />
 652        public bool Equals(SearchIndexerDataSourceType other) => string.Equals(_value, other._value, StringComparison.In
 53
 54        /// <inheritdoc />
 55        [EditorBrowsable(EditorBrowsableState.Never)]
 056        public override int GetHashCode() => _value?.GetHashCode() ?? 0;
 57        /// <inheritdoc />
 758        public override string ToString() => _value;
 59    }
 60}