checkpoint
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Runtime.InteropServices;
|
||||
using Foodsoft.Alpm;
|
||||
|
||||
namespace Foodsoft.Alpm
|
||||
{
|
||||
@@ -9,13 +8,18 @@ namespace Foodsoft.Alpm
|
||||
{
|
||||
private SafeAlpmHandle() : base(IntPtr.Zero, true) { }
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), PrePrepareMethod]
|
||||
protected override bool ReleaseHandle() => alpm.alpm_release(handle) == 0;
|
||||
|
||||
public override bool IsInvalid
|
||||
{
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), PrePrepareMethod]
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
[PrePrepareMethod]
|
||||
get => handle == IntPtr.Zero;
|
||||
}
|
||||
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
[PrePrepareMethod]
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return alpm.alpm_release(handle) == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user