< Summary

Class:SharpHoundRPC.Wrappers.LSABase
Assembly:SharpHoundRPC
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\Wrappers\LSABase.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:33
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

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

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\SharpHoundRPC\Wrappers\LSABase.cs

#LineLine coverage
 1using System;
 2using SharpHoundRPC.Handles;
 3
 4namespace SharpHoundRPC.Wrappers
 5{
 6    public class LSABase : IDisposable
 7    {
 8        protected LSAHandle Handle;
 9
 010        protected LSABase(LSAHandle handle)
 011        {
 012            Handle = handle;
 013        }
 14
 15        public void Dispose()
 016        {
 017            Dispose(true);
 018        }
 19
 20        protected virtual void Dispose(bool disposing)
 021        {
 022            if (disposing) ReleaseHandle();
 023        }
 24
 25        protected virtual void ReleaseHandle()
 026        {
 027            Handle?.Dispose();
 028            Handle = null;
 29            //Call suppressfinalize to prevent finalization, since we've already cleaned up our own stuff
 030            GC.SuppressFinalize(this);
 031        }
 32    }
 33}