< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Description.MetadataEndpointAddressServiceBehavior
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/MetadataEndpointAddressServiceBehavior.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 37
Line coverage: 100%
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%
CoreWCF.Description.IServiceBehavior.Validate(...)100%11100%
CoreWCF.Description.IServiceBehavior.AddBindingParameters(...)100%11100%
CoreWCF.Description.IServiceBehavior.ApplyDispatchBehavior(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Description/MetadataEndpointAddressServiceBehavior.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.ObjectModel;
 5using CoreWCF.Channels;
 6
 7namespace CoreWCF.Description
 8{
 9    public class MetadataEndpointAddressServiceBehavior : IServiceBehavior
 10    {
 11        private readonly IMetadataEndpointAddressProvider _provider;
 12
 113        public MetadataEndpointAddressServiceBehavior(IMetadataEndpointAddressProvider provider)
 14        {
 115            _provider = provider;
 116        }
 17
 18        void IServiceBehavior.Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
 19        {
 20
 121        }
 22
 23        void IServiceBehavior.AddBindingParameters(ServiceDescription serviceDescription,
 24            ServiceHostBase serviceHostBase, Collection<ServiceEndpoint> endpoints,
 25            BindingParameterCollection bindingParameters)
 26        {
 27
 228        }
 29
 30        void IServiceBehavior.ApplyDispatchBehavior(ServiceDescription serviceDescription,
 31            ServiceHostBase serviceHostBase)
 32        {
 133            var mex = ServiceMetadataExtension.EnsureServiceMetadataExtension(serviceHostBase);
 134            mex.DynamicMetadataEndpointAddressProvider = _provider;
 135        }
 36    }
 37}