< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.BufferManagerOutputStream
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Channels/BufferManagerOutputStream.cs
Line coverage
73%
Covered lines: 11
Uncovered lines: 4
Coverable lines: 15
Total lines: 49
Line coverage: 73.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
.ctor(...)100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%
Init(...)100%110%
Init(...)100%11100%
CreateQuotaExceededException(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/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
 52613        public BufferManagerOutputStream(string quotaExceededString) : base()
 14        {
 52615            _quotaExceededString = quotaExceededString;
 52616        }
 17
 118        public BufferManagerOutputStream(string quotaExceededString, int maxSize) : base(maxSize)
 19        {
 120            _quotaExceededString = quotaExceededString;
 121        }
 22
 23        public BufferManagerOutputStream(string quotaExceededString, int initialSize, int maxSize, BufferManager bufferM
 315324            : base(initialSize, maxSize, BufferManager.GetInternalBufferManager(bufferManager))
 25        {
 315326            _quotaExceededString = quotaExceededString;
 315327        }
 28
 29        public void Init(int initialSize, int maxSizeQuota, BufferManager bufferManager)
 30        {
 031            Init(initialSize, maxSizeQuota, maxSizeQuota, bufferManager);
 032        }
 33
 34        public void Init(int initialSize, int maxSizeQuota, int effectiveMaxSize, BufferManager bufferManager)
 35        {
 77436            Reinitialize(initialSize, maxSizeQuota, effectiveMaxSize, BufferManager.GetInternalBufferManager(bufferManag
 77437        }
 38
 39        protected override Exception CreateQuotaExceededException(int maxSizeQuota)
 40        {
 041            string excMsg = SR.Format(_quotaExceededString, maxSizeQuota);
 42            //if (TD.MaxSentMessageSizeExceededIsEnabled())
 43            //{
 44            //    TD.MaxSentMessageSizeExceeded(excMsg);
 45            //}
 046            return new QuotaExceededException(excMsg);
 47        }
 48    }
 49}