< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Dispatcher.WebHttpDispatchOperationSelectorData
Assembly: CoreWCF.WebHttp
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/Dispatcher/WebHttpDispatchOperationSelectorData.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 36
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 6
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.WebHttp/src/CoreWCF/Dispatcher/WebHttpDispatchOperationSelectorData.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.Collections.Generic;
 5using System.Text;
 6
 7namespace CoreWCF.Dispatcher
 8{
 9    internal class WebHttpDispatchOperationSelectorData
 10    {
 011        internal List<string> AllowedMethods { get; set; }
 12
 13        internal string AllowHeader
 14        {
 15            get
 16            {
 017                if (AllowedMethods != null)
 18                {
 019                    int allowedHeadersCount = AllowedMethods.Count;
 020                    if (allowedHeadersCount > 0)
 21                    {
 022                        StringBuilder stringBuilder = new StringBuilder(AllowedMethods[0]);
 023                        for (int x = 1; x < allowedHeadersCount; x++)
 24                        {
 025                            stringBuilder.Append(", " + AllowedMethods[x]);
 26                        }
 27
 028                        return stringBuilder.ToString();
 29                    }
 30                }
 31
 032                return null;
 33            }
 34        }
 35    }
 36}

Methods/Properties

AllowedMethods()
AllowHeader()