OF-DL/OF DL.Core/Services/IConfigService.cs

27 lines
693 B
C#

using OF_DL.Models;
namespace OF_DL.Services;
public interface IConfigService
{
Config CurrentConfig { get; }
bool IsCliNonInteractive { get; }
Task<bool> LoadConfigurationAsync(string[] args);
Task SaveConfigurationAsync(string filePath = "config.conf");
void UpdateConfig(Config newConfig);
/// <summary>
/// Returns property names and current values for toggleable config properties.
/// </summary>
List<(string Name, bool Value)> GetToggleableProperties();
/// <summary>
/// Applies selected toggleable properties. Returns true if any changed.
/// </summary>
bool ApplyToggleableSelections(List<string> selectedNames);
}