Windows phone 8.1 如何在Windows Phone 8.1上应用Thrift Server
我正在使用Apache Thrift在Windows Phone 8.1应用程序上创建Apache Thrift服务器,并将Windows上的控制台应用程序用作Apache Thrift客户端。 我创建了一个IDL旧文件,非常简单,如下所示:Windows phone 8.1 如何在Windows Phone 8.1上应用Thrift Server,windows-phone-8.1,thrift,Windows Phone 8.1,Thrift,我正在使用Apache Thrift在Windows Phone 8.1应用程序上创建Apache Thrift服务器,并将Windows上的控制台应用程序用作Apache Thrift客户端。 我创建了一个IDL旧文件,非常简单,如下所示: service Auto { void ClickButton(1: string content); } try { AutoHandler handler = new AutoHandl
service Auto {
void ClickButton(1: string content);
}
try
{
AutoHandler handler = new AutoHandler();
Common.Auto.Processor processor = new Common.Auto.Processor(handler);
TServerTransport serverTransport = new TServerSocket(9090);
TServer server = new TSimpleServer(processor, serverTransport);
System.Diagnostics.Debug.WriteLine("....");
server.Serve();
}
catch (Exception x)
{
System.Diagnostics.Debug.WriteLine(x.StackTrace);
}
更具体地说,我想使用我的控制台应用程序在我的WP应用程序中自动调用ClickButton方法。但当我在我的WP应用程序上创建服务器时,如下所示:
service Auto {
void ClickButton(1: string content);
}
try
{
AutoHandler handler = new AutoHandler();
Common.Auto.Processor processor = new Common.Auto.Processor(handler);
TServerTransport serverTransport = new TServerSocket(9090);
TServer server = new TSimpleServer(processor, serverTransport);
System.Diagnostics.Debug.WriteLine("....");
server.Serve();
}
catch (Exception x)
{
System.Diagnostics.Debug.WriteLine(x.StackTrace);
}
我得到的例外是:
Could not load file or assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
但是,当我尝试添加System.dll程序集时,我得到的错误消息如下:此程序集自动添加到我的项目中那么,如何将我的想法应用到应用程序中呢
我尝试在控制台应用程序的基础上创建两个示例应用程序,使用此链接对我来说没问题:并且我成功地自行应用了一些其他应用程序
提前谢谢。我至少可以确认Thrift在Windows Phone 7.x上有效。我从来没有单独尝试过8.x,所以我无法用我的手在我的心脏上确认这一点。请注意,要使用,因为标准的将不起作用 其次,C#library for Windows Phone的设计目的不是让Thrift服务器运行,只运行客户端。据我所知,由于WP 7.x的技术限制,Thrift服务器是不可能的,但是我不知道这些限制是否仍然适用于WP 8.x,所以可能会这样做。如果您能够在WindowsPhone8.x上运行服务器,我们将对您的贡献非常感兴趣