basic implementation, tabling for now

This commit is contained in:
2020-05-01 06:44:48 -04:00
committed by John K. Luebs
parent 1a394ddb31
commit 60d093dbad
11 changed files with 210 additions and 140 deletions

View File

@@ -9,7 +9,7 @@ namespace Foodsoft.Alpm
private readonly object _eventLock = new object();
private readonly SafeAlpmHandle _handle;
private EventHandler<LogEventArgs> _logEvent;
private EventHandler<LogEventArgs>? _logEvent;
public Handle(string root, string dbPath)
{
@@ -26,7 +26,7 @@ namespace Foodsoft.Alpm
set => Detail.SetStringCollection(value, _handle, s => alpm.alpm_option_add_cachedir(_handle, s));
}
public LogLevel LogLevel { get; set; }
public LogLevel LogLevel { get; set; } = LogLevel.Error;
public void Dispose()
{
@@ -54,7 +54,7 @@ namespace Foodsoft.Alpm
public bool RemoveCacheDir(string dir)
{
return Detail.WrapErrorBool(_handle, () => alpm.alpm_option_add_cachedir(_handle, dir));
return Detail.WrapErrorBool(_handle, () => alpm.alpm_option_remove_cachedir(_handle, dir));
}
public bool ShouldIgnorePackage(Package pkg)