< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Description.MessageBodyDescription
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/MessageBodyDescription.cs
Line coverage
88%
Covered lines: 16
Uncovered lines: 2
Coverable lines: 18
Total lines: 53
Line coverage: 88.8%
Branch coverage
66%
Covered branches: 4
Total branches: 6
Branch coverage: 66.6%
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(...)50%4477.77%
Clone()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/MessageBodyDescription.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.ComponentModel;
 5
 6namespace CoreWCF.Description
 7{
 8    public class MessageBodyDescription
 9    {
 10        private XmlName _wrapperName;
 11
 501812        public MessageBodyDescription()
 13        {
 501814            Parts = new MessagePartDescriptionCollection();
 501815        }
 16
 8017        internal MessageBodyDescription(MessageBodyDescription other)
 18        {
 8019            WrapperName = other.WrapperName;
 8020            WrapperNamespace = other.WrapperNamespace;
 8021            Parts = new MessagePartDescriptionCollection();
 16022            foreach (MessagePartDescription mpd in other.Parts)
 23            {
 024                Parts.Add(mpd.Clone());
 25            }
 26
 8027            if (other.ReturnValue != null)
 28            {
 029                ReturnValue = other.ReturnValue.Clone();
 30            }
 8031        }
 32
 33        internal MessageBodyDescription Clone()
 34        {
 8035            return new MessageBodyDescription(this);
 36        }
 37
 6984838        public MessagePartDescriptionCollection Parts { get; }
 39
 40        [DefaultValue(null)]
 7996641        public MessagePartDescription ReturnValue { get; set; }
 42
 43        [DefaultValue(null)]
 44        public string WrapperName
 45        {
 1164146            get { return _wrapperName?.EncodedName; }
 1028447            set { _wrapperName = new XmlName(value, true /*isEncoded*/); }
 48        }
 49
 50        [DefaultValue(null)]
 1152051        public string WrapperNamespace { get; set; }
 52    }
 53}