Files
TEngine/Luban/Luban.ClientServer/Templates/proto/cs/stub.tpl
ALEXTANG 36353294d6 Start TEngine3.0
Start TEngine3.0
2023-03-31 17:27:49 +08:00

20 lines
580 B
Smarty

using Bright.Serialization;
namespace {{namespace}}
{
public static class {{name}}
{
public static System.Collections.Generic.Dictionary<int, Bright.Net.Codecs.ProtocolCreator> Factories { get; } = new System.Collections.Generic.Dictionary<int, Bright.Net.Codecs.ProtocolCreator>
{
{{~ for proto in protos ~}}
[{{proto.full_name}}.__ID__] = () => new {{proto.full_name}}(),
{{~end~}}
{{~ for rpc in rpcs ~}}
[{{rpc.full_name}}.__ID__] = () => new {{rpc.full_name}}(),
{{~end~}}
};
}
}