boltffi_bindgen 0.25.0

Code generation library for BoltFFI - generates Swift, Kotlin, and TypeScript bindings
Documentation

{%- let callable = method %}
{%- let native_method_name = method.native_method_name %}
{%- let native_call_args = method.full_native_call_args() %}
{%- let native_call_args_async = method.full_native_call_args_async() %}
{%- if method.is_async() %}
{%- match method.async_call %}
{%- when Some with (ac) %}
{%- if method.receiver.is_static() %}
{{ self::summary_doc_block(method.summary_doc, "        ") }}        public static {{ method.task_return_type() }} {{ method.name }}({% for p in method.params %}{{ p.csharp_type }} {{ p.name }}{% if !loop.last %}, {% endif %}{% endfor %})
            => {{ method.name }}({% for p in method.params %}{{ p.name }}, {% endfor %}global::System.Threading.CancellationToken.None);

{{ self::summary_doc_block(method.summary_doc, "        ") }}        public static {{ method.task_return_type() }} {{ method.name }}({% for p in method.params %}{{ p.csharp_type }} {{ p.name }}, {% endfor %}global::System.Threading.CancellationToken cancellationToken)
{%- else %}
{{ self::summary_doc_block(method.summary_doc, "        ") }}        public {{ method.task_return_type() }} {{ method.name }}({% for p in method.params %}{{ p.csharp_type }} {{ p.name }}{% if !loop.last %}, {% endif %}{% endfor %})
            => {{ method.name }}({% for p in method.params %}{{ p.name }}, {% endfor %}global::System.Threading.CancellationToken.None);

{{ self::summary_doc_block(method.summary_doc, "        ") }}        public {{ method.task_return_type() }} {{ method.name }}({% for p in method.params %}{{ p.csharp_type }} {{ p.name }}, {% endfor %}global::System.Threading.CancellationToken cancellationToken)
{%- endif %}
        {
{%- if !method.receiver.is_static() %}
            ThrowIfDisposed();
{%- endif %}
{%- include "render_csharp/callable_setup.txt" -%}
{%- include "render_csharp/callable_open_pins.txt" -%}
{%- include "render_csharp/callable_async_return.txt" -%}
{%- include "render_csharp/callable_close_pins.txt" %}
        }
{%- when None %}
{%- endmatch %}
{%- else %}
{%- if method.receiver.is_static() %}
{{ self::summary_doc_block(method.summary_doc, "        ") }}        public static {{ method.return_type }} {{ method.name }}({% for p in method.params %}{{ p.csharp_type }} {{ p.name }}{% if !loop.last %}, {% endif %}{% endfor %})
{%- else %}
{{ self::summary_doc_block(method.summary_doc, "        ") }}        public {{ method.return_type }} {{ method.name }}({% for p in method.params %}{{ p.csharp_type }} {{ p.name }}{% if !loop.last %}, {% endif %}{% endfor %})
{%- endif %}
        {
{%- if !method.receiver.is_static() %}
            ThrowIfDisposed();
{%- endif %}
{%- include "render_csharp/callable_setup.txt" -%}
{%- include "render_csharp/callable_open_pins.txt" -%}
{%- include "render_csharp/callable_sync_return.txt" -%}
{%- include "render_csharp/callable_close_pins.txt" %}
        }
{%- endif %}