< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.WSHttpBindingElement
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/WSHttpBindingElement.cs
Line coverage
90%
Covered lines: 18
Uncovered lines: 2
Coverable lines: 20
Total lines: 54
Line coverage: 90%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
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%11100%
CreateBinding()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/WSHttpBindingElement.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 CoreWCF.Channels;
 6
 7namespace CoreWCF.Configuration
 8{
 9    public class WSHttpBindingElement : WSHttpBindingBaseElement
 10    {
 11        public WSHttpBindingElement(string name)
 312        : base(name)
 13        {
 314        }
 15
 16        public WSHttpBindingElement()
 317            : this(null)
 18        {
 319        }
 20
 21        [ConfigurationProperty(ConfigurationStrings.AllowCookies, DefaultValue = false)]
 22        public bool AllowCookies
 23        {
 024            get { return (bool)base[ConfigurationStrings.AllowCookies]; }
 025            set { base[ConfigurationStrings.AllowCookies] = value; }
 26
 27        }
 28
 29        [ConfigurationProperty(ConfigurationStrings.Security)]
 30        public WSHttpSecurityElement Security
 31        {
 532            get { return (WSHttpSecurityElement)base[ConfigurationStrings.Security]; }
 33        }
 34
 35        public override Binding CreateBinding()
 36        {
 237            var binding = new WSHttpBinding(Security.Mode)
 238            {
 239                CloseTimeout = CloseTimeout,
 240                MaxBufferPoolSize = MaxBufferPoolSize,
 241                MaxReceivedMessageSize = MaxReceivedMessageSize,
 242                Name = Name,
 243                OpenTimeout = OpenTimeout,
 244                ReaderQuotas = ReaderQuotas.Clone(),
 245                ReceiveTimeout = ReceiveTimeout,
 246                SendTimeout = SendTimeout,
 247            };
 48
 49            //binding.AllowCookies = this.AllowCookies;
 250            Security.ApplyConfiguration(binding.Security);
 251            return binding;
 52        }
 53    }
 54}