< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Description.MessageHeaderDescription
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/MessageHeaderDescription.cs
Line coverage
52%
Covered lines: 9
Uncovered lines: 8
Coverable lines: 17
Total lines: 52
Line coverage: 52.9%
Branch coverage
75%
Covered branches: 3
Total branches: 4
Branch coverage: 75%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%11100%
.ctor(...)100%110%
Clone()100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/MessageHeaderDescription.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.Xml;
 5
 6namespace CoreWCF.Description
 7{
 8    public class MessageHeaderDescription : MessagePartDescription
 9    {
 10        private bool _isUnknownHeader;
 11
 12        public MessageHeaderDescription(string name, string ns)
 8613            : base(name, ns)
 14        {
 8615        }
 16
 17        internal MessageHeaderDescription(MessageHeaderDescription other)
 018            : base(other)
 19        {
 020            MustUnderstand = other.MustUnderstand;
 021            Relay = other.Relay;
 022            Actor = other.Actor;
 023            TypedHeader = other.TypedHeader;
 024            IsUnknownHeaderCollection = other.IsUnknownHeaderCollection;
 025        }
 26
 27        public override MessagePartDescription Clone()
 28        {
 029            return new MessageHeaderDescription(this);
 30        }
 31
 9832        public string Actor { get; set; }
 33
 9834        public bool MustUnderstand { get; set; }
 35
 9836        public bool Relay { get; set; }
 37
 20038        public bool TypedHeader { get; set; }
 39
 40        internal bool IsUnknownHeaderCollection
 41        {
 42            get
 43            {
 35244                return _isUnknownHeader || Multiple && (Type == typeof(XmlElement));
 45            }
 46            set
 47            {
 448                _isUnknownHeader = value;
 449            }
 50        }
 51    }
 52}