< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Runtime.Diagnostics.EtwDiagnosticTrace
Assembly: CoreWCF.WebHttp
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/Runtime/Diagnostics/EtwDiagnosticTrace.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 75
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%
.ctor(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/Runtime/Diagnostics/EtwDiagnosticTrace.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;
 5namespace CoreWCF.Runtime.Diagnostics
 6{
 7    internal sealed class EtwDiagnosticTrace
 8    {
 09        public static readonly Guid ImmutableDefaultEtwProviderId = new Guid("{c651f5f6-1c0d-492e-8ae1-b4efd7c9d503}");
 010        private static Guid s_defaultEtwProviderId = ImmutableDefaultEtwProviderId;
 11
 12        public static Guid DefaultEtwProviderId
 13        {
 14            get
 15            {
 016                return s_defaultEtwProviderId;
 17            }
 18            set
 19            {
 020                s_defaultEtwProviderId = value;
 021            }
 22        }
 23
 024        public EtwDiagnosticTrace(string traceSourceName, Guid etwProviderId)
 25        //: base(traceSourceName)
 26        {
 27            //            try
 28            //            {
 29            //                this.TraceSourceName = traceSourceName;
 30            //                this.EventSourceName = string.Concat(this.TraceSourceName, " ", EventSourceVersion);
 31            //                CreateTraceSource();
 32            //            }
 33            //            catch (Exception exception)
 34            //            {
 35            //                if (Fx.IsFatal(exception))
 36            //                {
 37            //                    throw;
 38            //                }
 39
 40            //#pragma warning disable 618
 41            //                EventLogger logger = new EventLogger(this.EventSourceName, null);
 42            //                logger.LogEvent(TraceEventType.Error, TracingEventLogCategory, (uint)System.Runtime.Diagno
 43            //                    exception.ToString());
 44            //#pragma warning restore 618
 45            //            }
 46
 47            //            try
 48            //            {
 49            //                CreateEtwProvider(etwProviderId);
 50            //            }
 51            //            catch (Exception exception)
 52            //            {
 53            //                if (Fx.IsFatal(exception))
 54            //                {
 55            //                    throw;
 56            //                }
 57
 58            //                this.etwProvider = null;
 59            //#pragma warning disable 618
 60            //                EventLogger logger = new EventLogger(this.EventSourceName, null);
 61            //                logger.LogEvent(TraceEventType.Error, TracingEventLogCategory, (uint)System.Runtime.Diagno
 62            //                    exception.ToString());
 63            //#pragma warning restore 618
 64
 65            //            }
 66
 67            //            if (this.TracingEnabled || this.EtwTracingEnabled)
 68            //            {
 69            //#pragma warning disable 618
 70            //                this.AddDomainEventHandlersForCleanup();
 71            //#pragma warning restore 618
 72            //            }
 073        }
 74    }
 75}