< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Diagnostics.TraceUtility
Assembly: CoreWCF.Http
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/Diagnostics/TraceUtility.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 42
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
TraceUserCodeException(...)100%110%
TraceDroppedMessage(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/Diagnostics/TraceUtility.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;
 5using System.Reflection;
 6using CoreWCF.Channels;
 7using CoreWCF.Dispatcher;
 8
 9namespace CoreWCF.Diagnostics
 10{
 11    // TODO: Work out how TraceUtility fits in with all the other exception and tracing classes
 12    internal static partial class TraceUtility
 13    {
 14        internal static void TraceUserCodeException(Exception e, MethodInfo method)
 15        {
 16            //if (DiagnosticUtility.ShouldTraceWarning)
 17            //{
 18            //    StringTraceRecord record = new StringTraceRecord("Comment",
 19            //        SR.Format(SR.SFxUserCodeThrewException, method.DeclaringType.FullName, method.Name));
 20            //    DiagnosticUtility.DiagnosticTrace.TraceEvent(TraceEventType.Warning,
 21            //        TraceCode.UnhandledExceptionInUserOperation, GenerateMsdnTraceCode(TraceCode.UnhandledExceptionInU
 22            //        SR.Format(SR.TraceCodeUnhandledExceptionInUserOperation, method.DeclaringType.FullName, method.Nam
 23            //        record,
 24            //        e, null);
 25            //}
 026        }
 27
 28        internal static void TraceDroppedMessage(Message requestMessage, EndpointDispatcher endpoint)
 29        {
 30            //if (DiagnosticUtility.ShouldTraceInformation)
 31            //{
 32            //    EndpointAddress endpointAddress = null;
 33            //    if (dispatcher != null)
 34            //    {
 35            //        endpointAddress = dispatcher.EndpointAddress;
 36            //    }
 37            //    TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.DroppedAMessage,
 38            //        SR.Format(SR.TraceCodeDroppedAMessage), new MessageDroppedTraceRecord(message, endpointAddress));
 39            //}
 040        }
 41    }
 42}