2
0
forked from sim0n00ps/OF-DL
OF-DL/OF DL.Core/Services/IConfigService.cs

42 lines
1.2 KiB
C#

using OF_DL.Models.Config;
namespace OF_DL.Services;
public interface IConfigService
{
/// <summary>
/// Gets the active configuration in memory.
/// </summary>
Config CurrentConfig { get; }
/// <summary>
/// Gets whether the CLI requested non-interactive mode.
/// </summary>
bool IsCliNonInteractive { get; }
/// <summary>
/// Loads configuration from disk and applies runtime settings.
/// </summary>
Task<bool> LoadConfigurationAsync(string[] args);
/// <summary>
/// Saves the current configuration to disk.
/// </summary>
Task SaveConfigurationAsync(string filePath = "config.conf");
/// <summary>
/// Replaces the current configuration and applies runtime settings.
/// </summary>
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);
}