< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.BufferManagerOutputStream
Assembly: CoreWCF.WebHttp
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/Channels/BufferManagerOutputStream.cs
Line coverage
41%
Covered lines: 5
Uncovered lines: 7
Coverable lines: 12
Total lines: 45
Line coverage: 41.6%
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%110%
Init(...)100%110%
Init(...)100%11100%
CreateQuotaExceededException(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/Channels/BufferManagerOutputStream.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 CoreWCF.Runtime;
 6
 7namespace CoreWCF.Channels
 8{
 9    internal class BufferManagerOutputStream : BufferedOutputStream
 10    {
 11        private readonly string _quotaExceededString;
 12
 13        public BufferManagerOutputStream(string quotaExceededString)
 2414            : base()
 15        {
 2416            _quotaExceededString = quotaExceededString;
 2417        }
 18
 19        public BufferManagerOutputStream(string quotaExceededString, int initialSize, int maxSize, BufferManager bufferM
 020            : base(initialSize, maxSize, bufferManager)
 21        {
 022            _quotaExceededString = quotaExceededString;
 023        }
 24
 25        public void Init(int initialSize, int maxSizeQuota, BufferManager bufferManager)
 26        {
 027            Init(initialSize, maxSizeQuota, maxSizeQuota, bufferManager);
 028        }
 29
 30        public void Init(int initialSize, int maxSizeQuota, int effectiveMaxSize, BufferManager bufferManager)
 31        {
 2432            Reinitialize(initialSize, maxSizeQuota, effectiveMaxSize, bufferManager);
 2433        }
 34
 35        protected override Exception CreateQuotaExceededException(int maxSizeQuota)
 36        {
 037            string excMsg = SR.Format(_quotaExceededString, maxSizeQuota);
 38            //if (TD.MaxSentMessageSizeExceededIsEnabled())
 39            //{
 40            //    TD.MaxSentMessageSizeExceeded(excMsg);
 41            //}
 042            return new QuotaExceededException(excMsg);
 43        }
 44    }
 45}