< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.ServiceElement
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceElement.cs
Line coverage
27%
Covered lines: 3
Uncovered lines: 8
Coverable lines: 11
Total lines: 47
Line coverage: 27.2%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/ServiceElement.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;
 5using System.Configuration;
 6
 7namespace CoreWCF.Configuration
 8{
 9    public class ServiceElement : ConfigurationElement
 10    {
 11        [ConfigurationProperty(ConfigurationStrings.BehaviorConfiguration, DefaultValue = "")]
 12        [StringValidator(MinLength = 0)]
 13        public string BehaviorConfiguration
 14        {
 115            get { return (string)base[ConfigurationStrings.BehaviorConfiguration]; }
 16            set
 17            {
 018                if (string.IsNullOrEmpty(value))
 19                {
 020                    value = string.Empty;
 21                }
 022                base[ConfigurationStrings.BehaviorConfiguration] = value;
 023            }
 24        }
 25
 26        [ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, Options = ConfigurationPropertyOptions.IsDefa
 27        public ServiceEndpointElementCollection Endpoints
 28        {
 1129            get { return (ServiceEndpointElementCollection)base[ConfigurationStrings.DefaultCollectionName]; }
 30        }
 31
 32        [ConfigurationProperty(ConfigurationStrings.Name, Options = ConfigurationPropertyOptions.IsKey | ConfigurationPr
 33        // [StringValidator(MinLength = 1)]
 34        public string Name
 35        {
 5036            get { return (string)base[ConfigurationStrings.Name]; }
 37            set
 38            {
 039                if (string.IsNullOrEmpty(value))
 40                {
 041                    value = string.Empty;
 42                }
 043                base[ConfigurationStrings.Name] = value;
 044            }
 45        }
 46    }
 47}