修复BUG

This commit is contained in:
MuHua-123
2025-10-11 10:19:55 +08:00
parent 65e218850f
commit 62e3374187
3 changed files with 80 additions and 53 deletions
@@ -12,15 +12,22 @@ public class ValueContainer {
/// <summary> 所引器 </summary>
public ValueInstance this[string id] => dictionary[id];
/// <summary> 所引器(枚举) </summary>
public ValueInstance this[Enum id] => dictionary[id.ToString()];
/// <summary> 循环集合 </summary>
public void ForEach(Action<string, ValueInstance> action) {
foreach (var item in dictionary) { action?.Invoke(item.Key, item.Value); }
}
/// <summary> 添加数值 </summary>
public void AddInstance(ValueType type, Enum name) {
var instance = ValueInstance.Create(type, name);
AddInstance(instance);
}
/// <summary> 添加数值 </summary>
public void AddInstance(ValueType type, string name) {
var instance = new ValueInstance(type, name);
var instance = ValueInstance.Create(type, name);
AddInstance(instance);
}
/// <summary> 添加数值 </summary>