public Iterator(IntPtr collection, StringAllocator allocator) : base(collection, Natives.lilv_plugins_begin, Natives.lilv_plugins_next, (c, i) => Plugin.Get(Natives.lilv_plugins_get(c, i), allocator), Natives.lilv_plugins_is_end) { }
internal Plugins(IntPtr handle, StringAllocator allocator) : base(handle, h => {}, Natives.lilv_plugins_size, h => new Iterator(h, allocator)) { this.allocator = allocator; }
public void Dispose() { if (handle != IntPtr.Zero) { Natives.lilv_world_free(handle); } allocator.Dispose(); allocator = null; handle = IntPtr.Zero; }
internal State(IntPtr handle, StringAllocator allocator) { this.handle = handle; this.allocator = allocator; }
internal static State Get(IntPtr handle, StringAllocator allocator) => handle == IntPtr.Zero ? null : new State(handle, allocator);
Plugin(IntPtr handle, StringAllocator allocator) { this.handle = handle; this.allocator = allocator; }
internal static Plugin Get(IntPtr handle, StringAllocator allocator) => handle == IntPtr.Zero ? null : new Plugin(handle, allocator);