public void Add(LuaClass luaClass) { if (LuaClassGroups.TryGetValue(luaClass.Name, out var group)) { group.Add(luaClass); } else { LuaClassGroups[luaClass.Name] = new LuaClassGroup(luaClass); } }
public void Add(LuaClass luaClass) { if (luaClass.Name != Name) { throw new Exception($"Name mismatch {luaClass.Name} != {Name}"); } foreach (var(k, v) in luaClass.FieldDictionary) { if (!FieldDictionary.ContainsKey(k)) { Updated = true; FieldDictionary[k] = v; } } }
public LuaClassGroup(LuaClass luaClass) { FieldDictionary = new Dictionary <string, object>(luaClass.FieldDictionary); Name = luaClass.Name; }