< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.ServiceModelExtensionElement
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceModelExtensionElement.cs
Line coverage
50%
Covered lines: 8
Uncovered lines: 8
Coverable lines: 16
Total lines: 52
Line coverage: 50%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
InternalInitializeDefault()100%11100%
CopyFrom(...)0%440%
DeserializeInternal(...)100%11100%
IsModifiedInternal()100%110%
ResetModifiedInternal()100%11100%
SetReadOnlyInternal()100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceModelExtensionElement.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.Configuration;
 5using System.Security.Permissions;
 6using System.Xml;
 7
 8namespace CoreWCF.Configuration
 9{
 10    public abstract class ServiceModelExtensionElement : ServiceModelConfigurationElement
 11    {
 3412        public string ExtensionCollectionName { get; protected internal set; }
 3413        public string ConfigurationElementName { get; protected internal set; }
 14
 15        internal void InternalInitializeDefault()
 16        {
 1717            InitializeDefault();
 1718        }
 19
 20        public virtual void CopyFrom(ServiceModelExtensionElement from)
 21        {
 022            if (IsReadOnly())
 23            {
 024                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(string.Format
 25            }
 026            if (from == null)
 27            {
 028                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(from));
 29            }
 030        }
 31
 32        internal void DeserializeInternal(XmlReader reader, bool serializeCollectionKey)
 33        {
 1734            DeserializeElement(reader, serializeCollectionKey);
 1735        }
 36
 37        internal bool IsModifiedInternal()
 38        {
 039            return IsModified();
 40        }
 41
 42        internal void ResetModifiedInternal()
 43        {
 1744            ResetModified();
 1745        }
 46
 47        internal void SetReadOnlyInternal()
 48        {
 049            SetReadOnly();
 050        }
 51    }
 52}