< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Runtime.ServiceModelSynchronizationContext
Assembly: CoreWCF.NetFramingBase
File(s): /home/runner/work/CoreWCF/CoreWCF/src/Common/src/CoreWCF/Runtime/ServiceModelSynchronizationContext.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 18
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.cctor()100%110%
Post(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/Common/src/CoreWCF/Runtime/ServiceModelSynchronizationContext.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System.Threading;
 5using System.Threading.Tasks;
 6
 7namespace CoreWCF.Runtime
 8{
 9    internal class ServiceModelSynchronizationContext : SynchronizationContext
 10    {
 011        public static ServiceModelSynchronizationContext Instance = new ServiceModelSynchronizationContext();
 12
 13        public override void Post(SendOrPostCallback d, object state)
 14        {
 015            Task.Factory.StartNew((s) => d(s), state, default, TaskCreationOptions.RunContinuationsAsynchronously, IOThr
 016        }
 17    }
 18}