< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 46
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/DeclarativeSecurityAttribute.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.Reflection.Metadata.Ecma335;
 5
 6namespace System.Reflection.Metadata
 7{
 8    public readonly struct DeclarativeSecurityAttribute
 9    {
 10        private readonly MetadataReader _reader;
 11
 12        // Workaround: JIT doesn't generate good code for nested structures, so use RowId.
 13        private readonly int _rowId;
 14
 15        internal DeclarativeSecurityAttribute(MetadataReader reader, int rowId)
 016        {
 017            _reader = reader;
 018            _rowId = rowId;
 019        }
 20
 21        public DeclarativeSecurityAction Action
 22        {
 23            get
 024            {
 025                return _reader.DeclSecurityTable.GetAction(_rowId);
 026            }
 27        }
 28
 29        public EntityHandle Parent
 30        {
 31            get
 032            {
 033                return _reader.DeclSecurityTable.GetParent(_rowId);
 034            }
 35        }
 36
 37        public BlobHandle PermissionSet
 38        {
 39            get
 040            {
 041                return _reader.DeclSecurityTable.GetPermissionSet(_rowId);
 042            }
 43        }
 44    }
 45}
 46