alef 0.62.9

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
    /// <summary>
    /// Create a new {{ service_name }}.
    /// </summary>
    public {{ class_name }}({{ params_decl }}) {
        var handle = NativeMethods.{{ native_new }}();
        if (handle == 0) {
            throw new InvalidOperationException("Native service constructor returned a null handle");
        }
        _safeHandle = new {{ class_name }}SafeHandle(handle);
    }