Checkpoint

This commit is contained in:
2020-05-01 05:08:04 -04:00
parent abba062f4f
commit 1a394ddb31
20 changed files with 239 additions and 102 deletions

View File

@@ -42,7 +42,7 @@ namespace Foodsoft.Alpm
// ReSharper disable once LoopCanBeConvertedToQuery
foreach (var s in value)
if (alpm.alpm_list_append_strdup(ref listPtr, s) == IntPtr.Zero)
throw new AlpmException(Error.Memory);
throw new AlpmException(ErrorCode.Memory);
success = true;
}
@@ -63,8 +63,8 @@ namespace Foodsoft.Alpm
public SigLevel SigLevel => alpm.alpm_db_get_siglevel(_handle);
public Error Valid =>
alpm.alpm_db_get_valid(_handle) != 0 ? alpm.alpm_errno(_handle.SafeAlpmHandle) : Error.OK;
public ErrorCode Valid =>
alpm.alpm_db_get_valid(_handle) != 0 ? alpm.alpm_errno(_handle.SafeAlpmHandle) : ErrorCode.OK;
public CachePackageList PackageCache
{
@@ -118,7 +118,7 @@ namespace Foodsoft.Alpm
if (pkgPtr == IntPtr.Zero)
{
var err = alpm.alpm_errno(_handle.SafeAlpmHandle);
if (err == Error.PkgNotFound)
if (err == ErrorCode.PkgNotFound)
return null;
throw new AlpmException(err);
}
@@ -134,7 +134,7 @@ namespace Foodsoft.Alpm
if (result == IntPtr.Zero)
{
var errNo = alpm.alpm_errno(_handle.SafeAlpmHandle);
if (errNo != Error.OK)
if (errNo != ErrorCode.OK)
throw new AlpmException(errNo);
}