< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 25
Coverable lines: 25
Total lines: 74
Line coverage: 0%
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%110%
CopyTo(...)100%110%
Add(...)100%110%
Contains(...)100%110%
System.Collections.IEnumerable.GetEnumerator()100%110%
GetEnumerator()100%110%
Remove(...)100%110%
Clear()100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Net.Primitives/src/System/Net/NetworkInformation/IPAddressCollection.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;
 5
 6namespace System.Net.NetworkInformation
 7{
 8    public class IPAddressCollection : ICollection<IPAddress>
 9    {
 010        protected internal IPAddressCollection()
 011        {
 012        }
 13
 14        public virtual void CopyTo(IPAddress[] array, int offset)
 015        {
 016            throw NotImplemented.ByDesign;
 17        }
 18
 19        public virtual int Count
 20        {
 21            get
 022            {
 023                throw NotImplemented.ByDesign;
 24            }
 25        }
 26
 27        public virtual bool IsReadOnly
 28        {
 29            get
 030            {
 031                return true;
 032            }
 33        }
 34
 35        public virtual void Add(IPAddress address)
 036        {
 037            throw new NotSupportedException(SR.net_collection_readonly);
 38        }
 39
 40        public virtual bool Contains(IPAddress address)
 041        {
 042            throw NotImplemented.ByDesign;
 43        }
 44
 45        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
 046        {
 047            return this.GetEnumerator();
 048        }
 49
 50        public virtual IEnumerator<IPAddress> GetEnumerator()
 051        {
 052            throw NotImplemented.ByDesign;
 53        }
 54
 55        public virtual IPAddress this[int index]
 56        {
 57            get
 058            {
 059                throw NotImplemented.ByDesign;
 60            }
 61        }
 62
 63        public virtual bool Remove(IPAddress address)
 064        {
 065            throw new NotSupportedException(SR.net_collection_readonly);
 66        }
 67
 68        public virtual void Clear()
 069        {
 070            throw new NotSupportedException(SR.net_collection_readonly);
 71        }
 72    }
 73}
 74