mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 23:07:28 +08:00
[+] Add some interfaces for attributes
This commit is contained in:
8
AquaMai/AquaMai.Config.Interfaces/IConfigComment.cs
Normal file
8
AquaMai/AquaMai.Config.Interfaces/IConfigComment.cs
Normal 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);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace AquaMai.Config.Interfaces;
|
||||
|
||||
public interface IConfigEntryAttribute
|
||||
{
|
||||
IConfigComment Comment { get; }
|
||||
bool HideWhenDefault { get; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AquaMai.Config.Interfaces;
|
||||
|
||||
public interface IConfigSectionAttribute
|
||||
{
|
||||
IConfigComment Comment { get; }
|
||||
bool ExampleHidden { get; }
|
||||
bool DefaultOn { get; }
|
||||
bool AlwaysEnabled { get; }
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user