< Summary

Class:Microsoft.Azure.ServiceBus.Primitives.TaskExtensionHelper
Assembly:Microsoft.Azure.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Microsoft.Azure.ServiceBus\src\Primitives\TaskExtensionHelper.cs
Covered lines:5
Uncovered lines:3
Coverable lines:8
Total lines:29
Line coverage:62.5% (5 of 8)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
Schedule(...)-100%100%
ScheduleInternal()-50%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\servicebus\Microsoft.Azure.ServiceBus\src\Primitives\TaskExtensionHelper.cs

#LineLine coverage
 1// Copyright (c) Microsoft. All rights reserved.
 2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
 3
 4namespace Microsoft.Azure.ServiceBus.Primitives
 5{
 6    using System;
 7    using System.Threading.Tasks;
 8
 9    static class TaskExtensionHelper
 10    {
 11        public static void Schedule(Func<Task> func)
 12        {
 1613            _ = ScheduleInternal(func);
 1614        }
 15
 16        static async Task ScheduleInternal(Func<Task> func)
 17        {
 18            try
 19            {
 1620                await func().ConfigureAwait(false);
 1621            }
 022            catch (Exception ex)
 23            {
 024                MessagingEventSource.Log.ScheduleTaskFailed(func, ex);
 025            }
 1626        }
 27
 28    }
 29}

Methods/Properties

Schedule(...)
ScheduleInternal()