< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.Face.Models.SnapshotObjectTypeEnumExtension
Assembly:Microsoft.Azure.CognitiveServices.Vision.Face
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\SnapshotObjectType.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:72
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%
ParseSnapshotObjectType(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\SnapshotObjectType.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.CognitiveServices.Vision.Face.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 SnapshotObjectType.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum SnapshotObjectType
 23    {
 24        [EnumMember(Value = "FaceList")]
 25        FaceList,
 26        [EnumMember(Value = "LargeFaceList")]
 27        LargeFaceList,
 28        [EnumMember(Value = "LargePersonGroup")]
 29        LargePersonGroup,
 30        [EnumMember(Value = "PersonGroup")]
 31        PersonGroup
 32    }
 33    internal static class SnapshotObjectTypeEnumExtension
 34    {
 35        internal static string ToSerializedValue(this SnapshotObjectType? value)
 36        {
 037            return value == null ? null : ((SnapshotObjectType)value).ToSerializedValue();
 38        }
 39
 40        internal static string ToSerializedValue(this SnapshotObjectType value)
 41        {
 42            switch( value )
 43            {
 44                case SnapshotObjectType.FaceList:
 045                    return "FaceList";
 46                case SnapshotObjectType.LargeFaceList:
 047                    return "LargeFaceList";
 48                case SnapshotObjectType.LargePersonGroup:
 049                    return "LargePersonGroup";
 50                case SnapshotObjectType.PersonGroup:
 051                    return "PersonGroup";
 52            }
 053            return null;
 54        }
 55
 56        internal static SnapshotObjectType? ParseSnapshotObjectType(this string value)
 57        {
 58            switch( value )
 59            {
 60                case "FaceList":
 061                    return SnapshotObjectType.FaceList;
 62                case "LargeFaceList":
 063                    return SnapshotObjectType.LargeFaceList;
 64                case "LargePersonGroup":
 065                    return SnapshotObjectType.LargePersonGroup;
 66                case "PersonGroup":
 067                    return SnapshotObjectType.PersonGroup;
 68            }
 069            return null;
 70        }
 71    }
 72}