< Summary

Class:Microsoft.Azure.Search.Models.IndexerStatusEnumExtension
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\IndexerStatus.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:66
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerializedValue(...)-0%0%
ToSerializedValue(...)-0%0%
ParseIndexerStatus(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\IndexerStatus.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Search.Models
 12{
 13    using Newtonsoft.Json;
 14    using Newtonsoft.Json.Converters;
 15    using System.Runtime;
 16    using System.Runtime.Serialization;
 17
 18    /// <summary>
 19    /// Defines values for IndexerStatus.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum IndexerStatus
 23    {
 24        [EnumMember(Value = "unknown")]
 25        Unknown,
 26        [EnumMember(Value = "error")]
 27        Error,
 28        [EnumMember(Value = "running")]
 29        Running
 30    }
 31    internal static class IndexerStatusEnumExtension
 32    {
 33        internal static string ToSerializedValue(this IndexerStatus? value)
 34        {
 035            return value == null ? null : ((IndexerStatus)value).ToSerializedValue();
 36        }
 37
 38        internal static string ToSerializedValue(this IndexerStatus value)
 39        {
 40            switch( value )
 41            {
 42                case IndexerStatus.Unknown:
 043                    return "unknown";
 44                case IndexerStatus.Error:
 045                    return "error";
 46                case IndexerStatus.Running:
 047                    return "running";
 48            }
 049            return null;
 50        }
 51
 52        internal static IndexerStatus? ParseIndexerStatus(this string value)
 53        {
 54            switch( value )
 55            {
 56                case "unknown":
 057                    return IndexerStatus.Unknown;
 58                case "error":
 059                    return IndexerStatus.Error;
 60                case "running":
 061                    return IndexerStatus.Running;
 62            }
 063            return null;
 64        }
 65    }
 66}