Skip to content

Commit

Permalink
避免MsgID=0的消息注册不上
Browse files Browse the repository at this point in the history
  • Loading branch information
davyxu committed Oct 28, 2020
1 parent 7485c37 commit 820a6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gen/csharp/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ namespace {{.PackageName}}
public static class MessageMetaRegister
{
public static void RegisterGeneratedMeta(MessageMeta meta)
{ {{range .Structs}}{{ if IsMessage .}}
{ {{range .Structs}}
meta.RegisterMeta(new MetaInfo
{
Type = typeof({{.Name}}),
ID = {{StructMsgID .}},
SourcePeer = "{{GetSourcePeer .}}",
TargetPeer = "{{GetTargetPeer .}}",
});{{end}} {{end}}
});{{end}}
}
}
{{end}}
Expand Down

0 comments on commit 820a6af

Please sign in to comment.