< Summary

Class:SharpHoundRPC.Handles.LSAHandle
Assembly:SharpHoundRPC
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\Handles\LSAHandle.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:33
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%
ReleaseHandle()0%200%
Finalize()100%100%

File(s)

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

#LineLine coverage
 1using System;
 2using Microsoft.Win32.SafeHandles;
 3using SharpHoundRPC.LSANative;
 4
 5namespace SharpHoundRPC.Handles
 6{
 7    public class LSAHandle : SafeHandleZeroOrMinusOneIsInvalid
 8    {
 09        public LSAHandle() : base(true)
 010        {
 011        }
 12
 013        public LSAHandle(IntPtr handle, bool ownsHandle) : base(ownsHandle)
 014        {
 015            SetHandle(handle);
 016        }
 17
 018        public LSAHandle(bool ownsHandle) : base(true)
 019        {
 020        }
 21
 22        protected override bool ReleaseHandle()
 023        {
 024            if (handle == IntPtr.Zero) return true;
 025            return LSAMethods.LsaClose(handle) == NtStatus.StatusSuccess;
 026        }
 27
 28        ~LSAHandle()
 029        {
 030            Dispose();
 031        }
 32    }
 33}