[英]How to use Couchbase.Lite-PCL in a Xamarin Forms project?
I see there's a Couchbase.Lite-PCL in nuget which has been published recently. 我看到最近发布了nuget中的Couchbase.Lite-PCL。 Is this capable of running in the PCL?
这可以在PCL中运行吗? Anyone knows how to make it work?
任何人都知道如何使其工作吗? I couldn't find any documentation on this.
我找不到关于此的任何文档。
It is not an official NuGet package, so your milage may vary. 它不是官方的NuGet软件包,因此您的里程可能会有所不同。
It does have the dll's in a portable folder, and the dll's are added fine to a PCL and the project seems to build. 它的确在便携式文件夹中包含dll,并且该dll也已很好地添加到PCL中,并且该项目似乎已构建。
Try it it, it might work fine, but don't expect any direct support from the couchbase people. 尝试一下,它可能会正常工作,但是不要指望沙发上的人会提供任何直接支持。
Alternatively you could implement an Interface in your PCL, which you implement per platform with the methods you need from the official couchbase nuget. 或者,您可以在PCL中实现一个接口,您可以使用官方的Couchbase nuget中所需的方法在每个平台上实现该接口。 Then inject that platform specific implementation at runtime through the IoC container Xamarin.Forms provide.
然后在运行时通过Xomarin.Forms提供的IoC容器注入特定于平台的实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.