< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.MessageParameterAttribute
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/MessageParameterAttribute.cs
Line coverage
66%
Covered lines: 6
Uncovered lines: 3
Coverable lines: 9
Total lines: 33
Line coverage: 66.6%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/MessageParameterAttribute.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
 7{
 8    [AttributeUsage(CoreWCFAttributeTargets.Parameter, Inherited = false)]
 9    public sealed class MessageParameterAttribute : Attribute
 10    {
 11        private string _name;
 12        internal const string NamePropertyName = "Name";
 13        public string Name
 14        {
 3315            get { return _name; }
 16            set
 17            {
 3518                if (value == null)
 19                {
 020                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(value));
 21                }
 3522                if (value == string.Empty)
 23                {
 024                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(nameof(val
 025                        SR.SFxNameCannotBeEmpty));
 26                }
 7027                _name = value; IsNameSetExplicit = true;
 3528            }
 29        }
 30
 6831        internal bool IsNameSetExplicit { get; private set; }
 32    }
 33}