我计划在我的下一个 C# Drizzle .com" rel="nofollow noreferrer">Mono 应用程序。 由于 Drizzle 没有可用的 C# 客户端,我想我可以通过转换 Java 客户端来尝试编写自己的客户端,然后使其与 DBLinq 一起使用。
看到 Java 客户端后,我意识到这是一项比我预期的更长的工作,而且我没有时间。 此外,Java 客户端还不是那么成熟。
由于有官方的 Drizzle C 客户端库 (libdrizzle),因此编写 C# 包装器可能是最好的解决方案。 是否有任何工具可以帮助生成此代码?
I am planning to use Drizzle in my next C# Mono app. Since there is no C# client available for Drizzle, I thought I would have a stab at writing my own by converting the Java client, and then making it work with DBLinq.
Having seen the Java client, I realise that it's a longer job that I had anticipated, and I don't have the time. Besides the Java client is not all that mature yet.
Since there is an official Drizzle C client library (libdrizzle), writing a C# wrapper might be the best solution. Are there any tools available that can assist in generating the code for this?
发布评论
评论(3)
您还应该查看 Launchpad 上的 drizzle-interface 项目。
在该项目中,SWIG 用于生成各种语言(例如 Python 和 Ruby)的包装器。 所有 SWIG 相关文件都是该项目的一部分,因此可能值得一看。 可能会让你想要实现的目标变得更容易。
You should also have a look at the drizzle-interface project on Launchpad.
Within that project, SWIG is used to generate wrappers for various languages such as Python and Ruby. All the SWIG related files are part of that project so it might be worth having a look there. Might make what you are trying to achieve a lot easier.
此外,Drizzle 使用 MySQL 协议,因此大多数 MySQL 客户端应该可以正常工作。
Additionally, Drizzle speaks the MySQL protocol, so most MySQL clients should work just fine.
SWIG 在自动生成 C 库的 .Net 包装器时非常有帮助,你绝对应该先尝试一下。
SWIG is very helpful when it comes to automatically generating .Net wrappers for C libraries, you should definitely try it first.