static void addSchema(Type GroupType, MessageAttribute messageAttr) { if (groupMap.ContainsKey(GroupType.Name)) { throw new Exception($"Group name {GroupType.Name} is duplicated."); } GroupSchema group = new GroupSchema(GroupType, messageAttr); groupMap.Add(group.Name, group); }
public GroupSchema(Type type, MessageAttribute messageAttr) { Name = type.Name; dependencies_type = messageAttr.dependencies; foreach (var msgType in type.GetNestedTypes()) { if (msgType.IsEnum) { addEnumType(msgType); } else { addMessageType(msgType); } havingTypes.Add(msgType); } }