< Summary - CoreWCF Coverage — PR #1766

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

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/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
 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 Exception ThrowHelperError(Exception exception, Message message)
 15        {
 16            // If the message is closed, we won't get an activity
 17            //Guid activityId = TraceUtility.ExtractActivityId(message);
 18            //if (DiagnosticUtility.ShouldTraceError)
 19            //{
 20            //    DiagnosticUtility.DiagnosticTrace.TraceEvent(TraceEventType.Error, TraceCode.ThrowingException, Genera
 21            //        TraceSR.Format(TraceSR.ThrowingException), null, exception, activityId, null);
 22            //}
 023            return exception;
 24        }
 25
 26        internal static void TraceUserCodeException(Exception e, MethodInfo method)
 27        {
 28            //if (DiagnosticUtility.ShouldTraceWarning)
 29            //{
 30            //    StringTraceRecord record = new StringTraceRecord("Comment",
 31            //        SR.Format(SR.SFxUserCodeThrewException, method.DeclaringType.FullName, method.Name));
 32            //    DiagnosticUtility.DiagnosticTrace.TraceEvent(TraceEventType.Warning,
 33            //        TraceCode.UnhandledExceptionInUserOperation, GenerateMsdnTraceCode(TraceCode.UnhandledExceptionInU
 34            //        SR.Format(SR.TraceCodeUnhandledExceptionInUserOperation, method.DeclaringType.FullName, method.Nam
 35            //        record,
 36            //        e, null);
 37            //}
 038        }
 39
 40        internal static void TraceDroppedMessage(Message requestMessage, EndpointDispatcher endpoint)
 41        {
 42            //if (DiagnosticUtility.ShouldTraceInformation)
 43            //{
 44            //    EndpointAddress endpointAddress = null;
 45            //    if (dispatcher != null)
 46            //    {
 47            //        endpointAddress = dispatcher.EndpointAddress;
 48            //    }
 49            //    TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.DroppedAMessage,
 50            //        SR.Format(SR.TraceCodeDroppedAMessage), new MessageDroppedTraceRecord(message, endpointAddress));
 51            //}
 052        }
 53    }
 54}