< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.MediaJobRetryExtensions
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobRetry.Serialization.cs
Covered lines:1
Uncovered lines:8
Coverable lines:9
Total lines:28
Line coverage:11.1% (1 of 9)
Covered branches:1
Total branches:8
Branch coverage:12.5% (1 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToMediaJobRetry(...)-33.33%25%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\MediaJobRetry.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9
 10namespace Azure.Messaging.EventGrid.SystemEvents
 11{
 12    internal static class MediaJobRetryExtensions
 13    {
 014        public static string ToSerialString(this MediaJobRetry value) => value switch
 015        {
 016            MediaJobRetry.DoNotRetry => "DoNotRetry",
 017            MediaJobRetry.MayRetry => "MayRetry",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MediaJobRetry value.")
 019        };
 20
 21        public static MediaJobRetry ToMediaJobRetry(this string value)
 22        {
 3223            if (string.Equals(value, "DoNotRetry", StringComparison.InvariantCultureIgnoreCase)) return MediaJobRetry.Do
 024            if (string.Equals(value, "MayRetry", StringComparison.InvariantCultureIgnoreCase)) return MediaJobRetry.MayR
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MediaJobRetry value.");
 26        }
 27    }
 28}