예제 #1
0
 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)
 {
 }
예제 #2
0
 internal Plugins(IntPtr handle, StringAllocator allocator)
     : base(handle,
            h => {},
            Natives.lilv_plugins_size,
            h => new Iterator(h, allocator))
 {
     this.allocator = allocator;
 }
예제 #3
0
 public void Dispose()
 {
     if (handle != IntPtr.Zero)
     {
         Natives.lilv_world_free(handle);
     }
     allocator.Dispose();
     allocator = null;
     handle    = IntPtr.Zero;
 }
예제 #4
0
 internal State(IntPtr handle, StringAllocator allocator)
 {
     this.handle    = handle;
     this.allocator = allocator;
 }
예제 #5
0
 internal static State Get(IntPtr handle, StringAllocator allocator) => handle == IntPtr.Zero ? null : new State(handle, allocator);
예제 #6
0
 Plugin(IntPtr handle, StringAllocator allocator)
 {
     this.handle    = handle;
     this.allocator = allocator;
 }
예제 #7
0
 internal static Plugin Get(IntPtr handle, StringAllocator allocator) => handle == IntPtr.Zero ? null : new Plugin(handle, allocator);