< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.BasicHttpBindingElement
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.ConfigurationManager/src/CoreWCF/Configuration/BasicHttpBindingElement.cs
Line coverage
100%
Covered lines: 20
Uncovered lines: 0
Coverable lines: 20
Total lines: 47
Line coverage: 100%
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/BasicHttpBindingElement.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 BasicHttpBindingElement : HttpBindingBaseElement
 10    {
 11        public BasicHttpBindingElement(string name)
 512            : base(name)
 13        {
 514        }
 15
 16        public BasicHttpBindingElement()
 517            : this(null)
 18        {
 519        }
 20
 21        [ConfigurationProperty(ConfigurationStrings.Security)]
 22        public BasicHttpSecurityElement Security
 23        {
 924            get { return (BasicHttpSecurityElement)base[ConfigurationStrings.Security]; }
 25        }
 26
 27        public override Binding CreateBinding()
 28        {
 429            var binding = new BasicHttpBinding(Security.Mode)
 430            {
 431                Name = Name,
 432                MaxReceivedMessageSize = MaxReceivedMessageSize,
 433                MaxBufferSize = MaxBufferSize,
 434                ReceiveTimeout = ReceiveTimeout,
 435                CloseTimeout = CloseTimeout,
 436                OpenTimeout = OpenTimeout,
 437                SendTimeout = SendTimeout,
 438                TransferMode = TransferMode,
 439                TextEncoding = TextEncoding,
 440                ReaderQuotas = ReaderQuotas.Clone(),
 441            };
 42
 443            Security.ApplyConfiguration(binding.Security);
 444            return binding;
 45        }
 46    }
 47}