如何在Xamarin.iOS中将DataContractSerializer替换为Protobuf-net序列化程序

时间:2014-11-17 11:28:23

标签: c# wcf xamarin.ios protobuf-net

我有使用protobuf-net作为序列化程序的WCF服务和必须使用此服务的Xamarin.iOS应用程序。

我为我的DTO类创建了预编译的序列化程序,但我无法理解如何在monotouch(Xamarin.iOS)客户端应用程序中替换DataContractSerializer,因为ProtoBehaviorExtension继承自BehaviorExtensionElement,这在ServiceModel 2中是不可用的。

@MarkDaniel回答says

  

但是,如果您从GitHub上的Mono存储库获取完整的System.ServiceModel并针对完整的Protobuf源构建它,那么您可以使其工作;我已经这样做了。

有人能告诉我们如何从Mono中提取完整的System.ServiceModel并使用Protobuf构建它吗?

可能有另一种方法在wcf客户端中序列化/反序列化数据吗?

0 个答案:

没有答案