checkpoint

This commit is contained in:
2020-04-30 20:40:52 -04:00
parent 9aa367e9f5
commit abba062f4f
28 changed files with 615 additions and 544 deletions

View File

@@ -6,10 +6,22 @@ namespace Foodsoft.Alpm
{
internal abstract class SafePackageHandle : SafeHandle
{
protected SafePackageHandle() : base(IntPtr.Zero, true) { }
protected SafePackageHandle(SafeAlpmHandle safeAlpmHandle) : base(IntPtr.Zero, true)
{
SafeAlpmHandle = safeAlpmHandle;
}
internal SafeAlpmHandle SafeAlpmHandle
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[PrePrepareMethod]
get;
}
public override bool IsInvalid
{
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), PrePrepareMethod]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[PrePrepareMethod]
get => handle == IntPtr.Zero;
}
}