< Summary

Class:Microsoft.Azure.CognitiveServices.Search.VideoSearch.Models.VideoQueryScenarioEnumExtension
Assembly:Microsoft.Azure.CognitiveServices.Search.BingVideoSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVideoSearch\src\Generated\VideoSearch\Models\VideoQueryScenario.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:56
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVideoSearch\src\Generated\VideoSearch\Models\VideoQueryScenario.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 VideoQueryScenario.
 16    /// </summary>
 17    [JsonConverter(typeof(StringEnumConverter))]
 18    public enum VideoQueryScenario
 19    {
 20        [EnumMember(Value = "List")]
 21        List,
 22        [EnumMember(Value = "SingleDominantVideo")]
 23        SingleDominantVideo
 24    }
 25    internal static class VideoQueryScenarioEnumExtension
 26    {
 27        internal static string ToSerializedValue(this VideoQueryScenario? value)
 28        {
 029            return value == null ? null : ((VideoQueryScenario)value).ToSerializedValue();
 30        }
 31
 32        internal static string ToSerializedValue(this VideoQueryScenario value)
 33        {
 34            switch( value )
 35            {
 36                case VideoQueryScenario.List:
 037                    return "List";
 38                case VideoQueryScenario.SingleDominantVideo:
 039                    return "SingleDominantVideo";
 40            }
 041            return null;
 42        }
 43
 44        internal static VideoQueryScenario? ParseVideoQueryScenario(this string value)
 45        {
 46            switch( value )
 47            {
 48                case "List":
 049                    return VideoQueryScenario.List;
 50                case "SingleDominantVideo":
 051                    return VideoQueryScenario.SingleDominantVideo;
 52            }
 053            return null;
 54        }
 55    }
 56}