Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin thrift pcl Implementation

I have been trying to find a way to use apache thrift in my Xamarin Forms app but I could not manage since thrift.dll needs System.Web.dll and there is no mono implementation for System.Web.dll. Do you know any workaround to achieve this?

Thanks..

like image 473
user15916 Avatar asked Aug 07 '15 07:08

user15916


1 Answers

In general, Thrift works fine with Mono, so that's not the issue. As you already found out, the problem starts where the limited capabilities of mobile devices' .NET framework implementations end. Regarding your specific problem: There is a Windows Phone 7.x project file around which has these dependencies:

  • Microsoft.Phone
  • Microsoft.Phone.Interop
  • System.Runtime.Serialization
  • System.Servicemodel.Web
  • System.Windows
  • system
  • System.Core
  • System.Xml
  • System.Net

The WinPhone7 *.csproj has of course limited capabilities, e.g. there is no server code available for some technical reasons. The compatibility mostly relies on SILVERLIGHT being defined, and yes, it may not be perfect, but works Good Enough™. You may try this one, see how far it supports your needs, and what changes need to be made (if any).

As of now, there are no Xamarin-specific things in the code, but you know, this is open source and we always appreciate pull requests or patches, especially valuable ones like this. If you think you could make a contribution, join the mailing list and/or the freenode #thrift IRC channel and ask for whatever support you need with this. We will be happy to help you.

like image 119
JensG Avatar answered Nov 07 '22 04:11

JensG