< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.ConnectionOrientedTransportDefaults
Assembly: CoreWCF.NetFramingBase
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/TransportDefaults.cs
Line coverage
83%
Covered lines: 5
Uncovered lines: 1
Coverable lines: 6
Total lines: 48
Line coverage: 83.3%
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
GetMaxConnections()100%110%
GetMaxPendingConnections()100%11100%
GetMaxPendingAccepts()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/TransportDefaults.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.Collections.Generic;
 6using System.Net.Security;
 7using System.Security.Authentication;
 8using System.Text;
 9using CoreWCF.Security;
 10
 11namespace CoreWCF.Channels
 12{
 13    internal static class TransportDefaults
 14    {
 15        internal const bool ExtractGroupsForWindowsAccounts = true; //SspiSecurityTokenProvider.DefaultExtractWindowsGro
 16        internal const long MaxReceivedMessageSize = 65536;
 17        //internal const HostNameComparisonMode HostNameComparisonMode = CoreWCF.HostNameComparisonMode.Exact;
 18        internal const int MaxDrainSize = (int)MaxReceivedMessageSize;
 19        //internal const long MaxBufferPoolSize = 512 * 1024;
 20        internal const int MaxBufferSize = (int)MaxReceivedMessageSize;
 21        internal const bool RequireClientCertificate = false;
 22        internal const SslProtocols SslProtocols = System.Security.Authentication.SslProtocols.None; // Let the OS decid
 23
 24        //internal static MessageEncoderFactory GetDefaultMessageEncoderFactory()
 25        //{
 26        //    return new BinaryMessageEncodingBindingElement().CreateMessageEncoderFactory();
 27        //}
 28    }
 29
 30    internal static class ConnectionOrientedTransportDefaults
 31    {
 32        internal const bool AllowNtlm = true; // Formerly SspiSecurityTokenProvider.DefaultAllowNtlm
 33        internal const HostNameComparisonMode HostNameComparisonMode = CoreWCF.HostNameComparisonMode.StrongWildcard;
 34        internal const int ConnectionBufferSize = 8192;
 35        internal const int MaxContentTypeSize = 256;
 36        internal const int MaxOutboundConnectionsPerEndpoint = 10;
 37        internal const int MaxViaSize = 2048;
 38        internal const ProtectionLevel ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
 39        internal const TransferMode TransferMode = CoreWCF.TransferMode.Buffered;
 40
 20041        internal static TimeSpan IdleTimeout => TimeSpan.FromMinutes(2);
 32742        internal static TimeSpan ChannelInitializationTimeout => TimeSpan.FromSeconds(30);
 12743        internal static TimeSpan MaxOutputDelay => TimeSpan.FromMilliseconds(200);
 044        internal static int GetMaxConnections() => GetMaxPendingConnections();
 12745        internal static int GetMaxPendingConnections() => 12 * Environment.ProcessorCount;
 12746        internal static int GetMaxPendingAccepts() => 2 * Environment.ProcessorCount;
 47    }
 48}