mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Start TEngine3.0
Start TEngine3.0
This commit is contained in:
47
Luban/Luban.ClientServer/Templates/proto/cs/rpc.tpl
Normal file
47
Luban/Luban.ClientServer/Templates/proto/cs/rpc.tpl
Normal file
@@ -0,0 +1,47 @@
|
||||
{{
|
||||
name = x.name
|
||||
full_name = x.full_name
|
||||
parent = x.parent
|
||||
fields = x.fields
|
||||
targ_type = x.targ_type
|
||||
tres_type = x.tres_type
|
||||
}}
|
||||
using Bright.Serialization;
|
||||
|
||||
namespace {{x.namespace_with_top_module}}
|
||||
{
|
||||
|
||||
{{~if x.comment != '' ~}}
|
||||
/// <summary>
|
||||
/// {{x.escape_comment}}
|
||||
/// </summary>
|
||||
{{~end~}}
|
||||
public sealed class {{name}} : Bright.Net.Codecs.Rpc<{{cs_define_type targ_type}}, {{cs_define_type tres_type}}>
|
||||
{
|
||||
public {{name}}()
|
||||
{
|
||||
}
|
||||
|
||||
public const int __ID__ = {{x.id}};
|
||||
|
||||
public override int GetTypeId()
|
||||
{
|
||||
return __ID__;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public override object Clone()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{{full_name}}{%{ {{arg:{Arg},res:{Res} }} }%}";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user