Experimenting with request/response struct names for non global RPCs
Publish PHP Package / docker (push) Successful in 6s Details

This commit is contained in:
Pavel Shevaev 2024-04-07 16:49:49 +03:00
parent 3a6c447a4e
commit 7895ef0663
1 changed files with 8 additions and 1 deletions

View File

@ -349,13 +349,20 @@ public enum {{o.name}}
}
{% endmacro %}
{% macro decl_rpc(o) %}
{% macro decl_rpc(o, is_global = true) %}
{% if is_global %}
{{_self.decl_struct(o.req)}}
{{_self.decl_struct(o.rsp)}}
{% endif %}
public class {{o.name}} : IRpc
{
{% if not is_global %}
{{_self.decl_struct(o.req)}}
{{_self.decl_struct(o.rsp)}}
{% endif %}
public IRpcError error = null;
public {{o.req.name}} req = new {{o.req.name}}();
public {{o.rsp.name}} rsp = new {{o.rsp.name}}();