< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.ProtocolExceptionHelper
Assembly: CoreWCF.ConfigurationManager
File(s): /home/runner/work/CoreWCF/CoreWCF/src/Common/src/CoreWCF/ProtocolExceptionHelper.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
Total lines: 35
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
ReceiveShutdownReturnedNonNull(...)0%220%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/Common/src/CoreWCF/ProtocolExceptionHelper.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.Globalization;
 5using CoreWCF.Channels;
 6
 7namespace CoreWCF
 8{
 9    internal static class ProtocolExceptionHelper
 10    {
 11        internal static ProtocolException ReceiveShutdownReturnedNonNull(Message message)
 12        {
 013            if (message.IsFault)
 14            {
 15                try
 16                {
 017                    MessageFault fault = MessageFault.CreateFault(message, 64 * 1024);
 018                    FaultReasonText reason = fault.Reason.GetMatchingTranslation(CultureInfo.CurrentCulture);
 019                    string text = SRCommon.Format(SRCommon.ReceiveShutdownReturnedFault, reason.Text);
 020                    return new ProtocolException(text);
 21                }
 022                catch (QuotaExceededException)
 23                {
 024                    string text = SRCommon.Format(SRCommon.ReceiveShutdownReturnedLargeFault, message.Headers.Action);
 025                    return new ProtocolException(text);
 26                }
 27            }
 28            else
 29            {
 030                string text = SRCommon.Format(SRCommon.ReceiveShutdownReturnedMessage, message.Headers.Action);
 031                return new ProtocolException(text);
 32            }
 033        }
 34    }
 35}