< Summary

Class:SharpHoundRPC.Handles.NetAPIPointer
Assembly:SharpHoundRPC
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\Handles\NetAPIPointer.cs
Covered lines:3
Uncovered lines:10
Coverable lines:13
Total lines:26
Line coverage:23% (3 of 13)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

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

File(s)

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

#LineLine coverage
 1using System;
 2using SharpHoundRPC.NetAPINative;
 3
 4namespace SharpHoundRPC.Handles
 5{
 6    public class NetAPIPointer : BasePointer
 7    {
 18        public NetAPIPointer() : base(true)
 19        {
 110        }
 11
 012        public NetAPIPointer(IntPtr handle) : base(handle, true)
 013        {
 014        }
 15
 016        public NetAPIPointer(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle)
 017        {
 018        }
 19
 20        protected override bool ReleaseHandle()
 021        {
 022            if (handle == IntPtr.Zero) return true;
 023            return NetAPIMethods.NetApiBufferFree(handle) == NetAPIEnums.NetAPIStatus.Success;
 024        }
 25    }
 26}