diff --git a/gen/csharp/text.go b/gen/csharp/text.go index 79051ab..99b3e8f 100644 --- a/gen/csharp/text.go +++ b/gen/csharp/text.go @@ -58,11 +58,11 @@ namespace {{.PackageName}} {{end}} {{if .RegEntry}} - public static class MessageMetaRegister + public static class MessageVisitor { - public static void RegisterGeneratedMeta(MessageMeta meta) + public static void Visit(Action callback) { {{range .Structs}} - meta.RegisterMeta(new MetaInfo + callback(new MetaInfo { Type = typeof({{.Name}}), ID = {{StructMsgID .}},