18 lines
535 B
C#
18 lines
535 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
public interface IConfigManager {
|
|
void SetFilePath(string filePath);
|
|
void SetDefault(Dictionary<string, object> defalutConfig);
|
|
T GetValue<T>(string key);
|
|
void SetValue<T>(string key, [NotNull]T value) {
|
|
ArgumentNullException.ThrowIfNull(key);
|
|
SetValue(key, (object?)value);
|
|
}
|
|
void SetValue(string key, [NotNull]object? value);
|
|
bool HasKey(string key);
|
|
void SaveToFile();
|
|
void LoadFromFile();
|
|
}
|