[+] Add some interfaces for attributes

This commit is contained in:
Clansty
2024-11-26 00:03:35 +08:00
parent 0ec048ceba
commit 792dce6843
9 changed files with 38 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
namespace AquaMai.Config.Interfaces;
public interface IConfigComment
{
string CommentEn { get; init; }
string CommentZh { get; init; }
public string GetLocalized(string lang);
}

View File

@@ -0,0 +1,7 @@
namespace AquaMai.Config.Interfaces;
public interface IConfigEntryAttribute
{
IConfigComment Comment { get; }
bool HideWhenDefault { get; }
}

View File

@@ -0,0 +1,9 @@
namespace AquaMai.Config.Interfaces;
public interface IConfigSectionAttribute
{
IConfigComment Comment { get; }
bool ExampleHidden { get; }
bool DefaultOn { get; }
bool AlwaysEnabled { get; }
}

View File

@@ -10,6 +10,7 @@ public interface IReflectionManager
public string Path { get; }
public string Name { get; }
public IReflectionField Field { get; }
public IConfigEntryAttribute Attribute { get; init; }
}
public interface ISection
@@ -17,6 +18,7 @@ public interface IReflectionManager
public string Path { get; }
public IReflectionType Type { get; }
public List<IEntry> Entries { get; }
public IConfigSectionAttribute Attribute { get; init; }
}
public IEnumerable<ISection> Sections { get; }