< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 66
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%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/NamespaceDefinition.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.Immutable;
 5using System.Diagnostics;
 6using System.Reflection.Metadata.Ecma335;
 7
 8namespace System.Reflection.Metadata
 9{
 10    public struct NamespaceDefinition
 11    {
 12        private readonly NamespaceData _data;
 13
 14        internal NamespaceDefinition(NamespaceData data)
 015        {
 016            Debug.Assert(data != null);
 017            _data = data;
 018        }
 19
 20        /// <summary>
 21        /// Gets the unqualified name of the NamespaceDefinition.
 22        /// </summary>
 23        public StringHandle Name
 24        {
 025            get { return _data.Name; }
 26        }
 27
 28        /// <summary>
 29        /// Gets the parent namespace.
 30        /// </summary>
 31        public NamespaceDefinitionHandle Parent
 32        {
 033            get { return _data.Parent; }
 34        }
 35
 36        /// <summary>
 37        /// Gets the namespace definitions that are direct children of the current
 38        /// namespace definition.
 39        ///
 40        /// System.Collections and System.Linq are direct children of System.
 41        /// System.Collections.Generic is a direct child of System.Collections.
 42        /// System.Collections.Generic is *not* a direct child of System.
 43        /// </summary>
 44        public ImmutableArray<NamespaceDefinitionHandle> NamespaceDefinitions
 45        {
 046            get { return _data.NamespaceDefinitions; }
 47        }
 48
 49        /// <summary>
 50        /// Gets all type definitions that reside directly in a namespace.
 51        /// </summary>
 52        public ImmutableArray<TypeDefinitionHandle> TypeDefinitions
 53        {
 054            get { return _data.TypeDefinitions; }
 55        }
 56
 57        /// <summary>
 58        /// Gets all exported types that reside directly in a namespace.
 59        /// </summary>
 60        public ImmutableArray<ExportedTypeHandle> ExportedTypes
 61        {
 062            get { return _data.ExportedTypes; }
 63        }
 64    }
 65}
 66