alef 0.63.1

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    /// <summary>
    /// {{ method_name }}.
    /// </summary>
    public {{ return_type }} {{ method_name }}({{ params_decl }}) {
{{ declarations }}
        bool handleAdded = false;
        try {
{{ setup }}
            _safeHandle.DangerousAddRef(ref handleAdded);
            return NativeMethods.{{ native_method }}(
                _safeHandle.AlefHandle{{ arg_lines }}
            );
        } finally {
            if (handleAdded) _safeHandle.DangerousRelease();
{{ teardown }}
        }
    }