< Summary

Class:SharpHoundRPC.Handles.SAMSidArray
Assembly:SharpHoundRPC
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\Handles\SAMSidArray.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:32
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor()100%100%
.ctor(...)100%100%
.ctor(...)100%100%
GetData()0%200%

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\Handles\SAMSidArray.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Runtime.InteropServices;
 4using System.Security.Principal;
 5
 6namespace SharpHoundRPC.Handles
 7{
 8    public class SAMSidArray : SAMPointer
 9    {
 010        public SAMSidArray()
 011        {
 012        }
 13
 014        public SAMSidArray(IntPtr handle) : base(handle)
 015        {
 016        }
 17
 018        public SAMSidArray(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle)
 019        {
 020        }
 21
 22        public IEnumerable<SecurityIdentifier> GetData(int count)
 023        {
 024            for (var i = 0; i < count; i++)
 025            {
 026                var rawPtr = Marshal.ReadIntPtr(handle, Marshal.SizeOf<IntPtr>() * i);
 027                var sid = new SecurityIdentifier(rawPtr);
 028                yield return sid;
 029            }
 030        }
 31    }
 32}