< Summary

Class:Microsoft.Azure.CognitiveServices.Search.VideoSearch.Models.VideoInsightModuleEnumExtension
Assembly:Microsoft.Azure.CognitiveServices.Search.BingVideoSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVideoSearch\src\Generated\VideoSearch\Models\VideoInsightModule.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:62
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%
ParseVideoInsightModule(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVideoSearch\src\Generated\VideoSearch\Models\VideoInsightModule.cs

#LineLine coverage
 1// <auto-generated>
 2// Code generated by Microsoft (R) AutoRest Code Generator.
 3// Changes may cause incorrect behavior and will be lost if the code is
 4// regenerated.
 5// </auto-generated>
 6
 7namespace Microsoft.Azure.CognitiveServices.Search.VideoSearch.Models
 8{
 9    using Newtonsoft.Json;
 10    using Newtonsoft.Json.Converters;
 11    using System.Runtime;
 12    using System.Runtime.Serialization;
 13
 14    /// <summary>
 15    /// Defines values for VideoInsightModule.
 16    /// </summary>
 17    [JsonConverter(typeof(StringEnumConverter))]
 18    public enum VideoInsightModule
 19    {
 20        [EnumMember(Value = "All")]
 21        All,
 22        [EnumMember(Value = "RelatedVideos")]
 23        RelatedVideos,
 24        [EnumMember(Value = "VideoResult")]
 25        VideoResult
 26    }
 27    internal static class VideoInsightModuleEnumExtension
 28    {
 29        internal static string ToSerializedValue(this VideoInsightModule? value)
 30        {
 031            return value == null ? null : ((VideoInsightModule)value).ToSerializedValue();
 32        }
 33
 34        internal static string ToSerializedValue(this VideoInsightModule value)
 35        {
 36            switch( value )
 37            {
 38                case VideoInsightModule.All:
 039                    return "All";
 40                case VideoInsightModule.RelatedVideos:
 041                    return "RelatedVideos";
 42                case VideoInsightModule.VideoResult:
 043                    return "VideoResult";
 44            }
 045            return null;
 46        }
 47
 48        internal static VideoInsightModule? ParseVideoInsightModule(this string value)
 49        {
 50            switch( value )
 51            {
 52                case "All":
 053                    return VideoInsightModule.All;
 54                case "RelatedVideos":
 055                    return VideoInsightModule.RelatedVideos;
 56                case "VideoResult":
 057                    return VideoInsightModule.VideoResult;
 58            }
 059            return null;
 60        }
 61    }
 62}