< Summary

Class:Microsoft.Azure.CognitiveServices.Search.VideoSearch.Models.VideoResolutionEnumExtension
Assembly:Microsoft.Azure.CognitiveServices.Search.BingVideoSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVideoSearch\src\Generated\VideoSearch\Models\VideoResolution.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:68
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:15
Branch coverage:0% (0 of 15)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVideoSearch\src\Generated\VideoSearch\Models\VideoResolution.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 VideoResolution.
 16    /// </summary>
 17    [JsonConverter(typeof(StringEnumConverter))]
 18    public enum VideoResolution
 19    {
 20        [EnumMember(Value = "All")]
 21        All,
 22        [EnumMember(Value = "SD480p")]
 23        SD480p,
 24        [EnumMember(Value = "HD720p")]
 25        HD720p,
 26        [EnumMember(Value = "HD1080p")]
 27        HD1080p
 28    }
 29    internal static class VideoResolutionEnumExtension
 30    {
 31        internal static string ToSerializedValue(this VideoResolution? value)
 32        {
 033            return value == null ? null : ((VideoResolution)value).ToSerializedValue();
 34        }
 35
 36        internal static string ToSerializedValue(this VideoResolution value)
 37        {
 38            switch( value )
 39            {
 40                case VideoResolution.All:
 041                    return "All";
 42                case VideoResolution.SD480p:
 043                    return "SD480p";
 44                case VideoResolution.HD720p:
 045                    return "HD720p";
 46                case VideoResolution.HD1080p:
 047                    return "HD1080p";
 48            }
 049            return null;
 50        }
 51
 52        internal static VideoResolution? ParseVideoResolution(this string value)
 53        {
 54            switch( value )
 55            {
 56                case "All":
 057                    return VideoResolution.All;
 58                case "SD480p":
 059                    return VideoResolution.SD480p;
 60                case "HD720p":
 061                    return VideoResolution.HD720p;
 62                case "HD1080p":
 063                    return VideoResolution.HD1080p;
 64            }
 065            return null;
 66        }
 67    }
 68}