< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Runtime.Diagnostics.EtwDiagnosticTrace
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Runtime/Diagnostics/EtwDiagnosticTrace.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 76
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.ConfigurationManager/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;
 5
 6namespace CoreWCF.Runtime.Diagnostics
 7{
 8    internal sealed class EtwDiagnosticTrace
 9    {
 010        public static readonly Guid ImmutableDefaultEtwProviderId = new Guid("{c651f5f6-1c0d-492e-8ae1-b4efd7c9d503}");
 011        private static Guid s_defaultEtwProviderId = ImmutableDefaultEtwProviderId;
 12
 13        public static Guid DefaultEtwProviderId
 14        {
 15            get
 16            {
 017                return s_defaultEtwProviderId;
 18            }
 19            set
 20            {
 021                s_defaultEtwProviderId = value;
 022            }
 23        }
 24
 025        public EtwDiagnosticTrace(string traceSourceName, Guid etwProviderId)
 26        //: base(traceSourceName)
 27        {
 28            //            try
 29            //            {
 30            //                this.TraceSourceName = traceSourceName;
 31            //                this.EventSourceName = string.Concat(this.TraceSourceName, " ", EventSourceVersion);
 32            //                CreateTraceSource();
 33            //            }
 34            //            catch (Exception exception)
 35            //            {
 36            //                if (Fx.IsFatal(exception))
 37            //                {
 38            //                    throw;
 39            //                }
 40
 41            //#pragma warning disable 618
 42            //                EventLogger logger = new EventLogger(this.EventSourceName, null);
 43            //                logger.LogEvent(TraceEventType.Error, TracingEventLogCategory, (uint)System.Runtime.Diagno
 44            //                    exception.ToString());
 45            //#pragma warning restore 618
 46            //            }
 47
 48            //            try
 49            //            {
 50            //                CreateEtwProvider(etwProviderId);
 51            //            }
 52            //            catch (Exception exception)
 53            //            {
 54            //                if (Fx.IsFatal(exception))
 55            //                {
 56            //                    throw;
 57            //                }
 58
 59            //                this.etwProvider = null;
 60            //#pragma warning disable 618
 61            //                EventLogger logger = new EventLogger(this.EventSourceName, null);
 62            //                logger.LogEvent(TraceEventType.Error, TracingEventLogCategory, (uint)System.Runtime.Diagno
 63            //                    exception.ToString());
 64            //#pragma warning restore 618
 65
 66            //            }
 67
 68            //            if (this.TracingEnabled || this.EtwTracingEnabled)
 69            //            {
 70            //#pragma warning disable 618
 71            //                this.AddDomainEventHandlersForCleanup();
 72            //#pragma warning restore 618
 73            //            }
 074        }
 75    }
 76}