【修复】 修复 cs proto 序列化代码的生成bug

main
walon 2020-11-17 23:20:39 +08:00
parent 5deb0427ca
commit ab559c17ea
3 changed files with 6 additions and 6 deletions

View File

@ -193,14 +193,14 @@ namespace {{x.namespace_with_top_module}}
public override void Serialize(ByteBuf _buf)
{
{{~ for field in fields ~}}
{{field.cs_serialize}}
{{cs_serialize '_buf' field.cs_style_name field.ctype}}
{{~end~}}
}
public override void Deserialize(ByteBuf _buf)
{
{{~ for field in fields ~}}
{{field.cs_deserialize}}
{{cs_deserialize '_buf' field.cs_style_name field.ctype}}
{{~end~}}
}

View File

@ -3,9 +3,9 @@ using Luban.Job.Common.TypeVisitors;
namespace Luban.Job.Proto.TypeVisitors
{
class CsUnderingSerializeVisitor : ITypeFuncVisitor<string, string, string>
class CsUnderingDeserializeVisitor : ITypeFuncVisitor<string, string, string>
{
public static CsUnderingSerializeVisitor Ins { get; } = new CsUnderingSerializeVisitor();
public static CsUnderingDeserializeVisitor Ins { get; } = new CsUnderingDeserializeVisitor();
public string Accept(TBool type, string bufName, string fieldName)
{

View File

@ -3,9 +3,9 @@ using Luban.Job.Common.TypeVisitors;
namespace Luban.Job.Proto.TypeVisitors
{
class CsUnderingDeserializeVisitor : ITypeFuncVisitor<string, string, string>
class CsUnderingSerializeVisitor : ITypeFuncVisitor<string, string, string>
{
public static CsUnderingDeserializeVisitor Ins { get; } = new CsUnderingDeserializeVisitor();
public static CsUnderingSerializeVisitor Ins { get; } = new CsUnderingSerializeVisitor();
public string Accept(TBool type, string bufName, string fieldName)
{