[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

C# wrapper of apt library libapt-pkg



In my C# application I've been able to retrieve package info using phyton.net > python-apt > libapt-pkg (I assume?) and I did manage to retrieve all the package info I needed.
But I would like to pinvoke the apt library directly for better resource use, performance and stability.
Is it correct I should target libapt-pkg.so?

And using python.net>python-apt I retrieved all package-names by first initializing the class Cache() and then call Cache.keys().
Can anyone point me in the right direction how to do the same by pinvoke libapt-pkg?
I've been looking at the cachefile.h (link below) header but I'm new to C/C++ so it doesn't make much sense for me at present.
Should I call pkgCache somehow?

https://salsa.debian.org/apt-team/apt/-/blob/main/apt-pkg/cachefile.h

Thanks in advance, 
Brian

Reply to: