紧凑框架3.5是否支持System.Runtime.Serialization?

编程入门 行业动态 更新时间:2024-10-22 19:34:29
本文介绍了紧凑框架3.5是否支持System.Runtime.Serialization?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在编写一个库,它是一组类,旨在在许多不同的.NET应用程序之间共享,包括至少一个使用.NET Compact Framework的类.我一直在使这些类将[DataContract]属性与一堆[DataMember]一起使用,以便使用DataContractJSONSerializer可以轻松地对它们进行序列化和反序列化.我一直在网上搜索以尝试确定.NET Compact Framework 3.5是否支持此功能(DataContractAttribute,DataMemberAttribute和DataContractJsonSerializer),但我什至没有运气,甚至无法在.NET Compact Framework 3.5中找到受支持的类的完整列表. .NET Framework.

I am writing a library which is a set of classes meant to be shared between many different .NET applications, including at least one which uses the .NET compact framework. I have been making these classes use the [DataContract] attribute with a bunch of [DataMember]s so that they are easy to serialize and deserialize using the DataContractJSONSerializer. I have been searching the web to try to find out if this functionality (DataContractAttribute, DataMemberAttribute, and DataContractJsonSerializer) is supported in the .NET Compact Framework 3.5 but I have had no luck even being able to find a full list of supported classes in the .NET Framework.

有人碰巧知道对这些功能的支持程度吗?

Does anyone happen to know the extent of support for these functions?

推荐答案

我相信 3.5 CE中存在System.Runtime.Serialization命名空间.这是完整的命名空间列表,但似乎其中不支持您感兴趣的任何功能.

I believe that System.Runtime.Serialization namespace exists in 3.5 CE. Here is complete list of namespaces, but it looks like any of functionalities you are interested are not supported within it.

据我了解,您正在尝试创建一些可以序列化的实体库.我认为您需要针对 CE应用程序使用另一种方法.说不同的库(或相同的代码,但为ce编译并定义了指令).然后,您将需要利用一些外部库进行json序列化(如果仍然需要).

As I understood you are trying to create some entities library which can be serialized. I think you need to have another approach for your CE application. Say different library (or same code but compiled for ce with directives defined). Then you would need to utilize some external library for json serialization (if you still need it).

还考虑使用另一种序列化机制代替DataContractJsonSerializer.从此处的另一个好问题开始.

Also think about using another serialization mechanism instead of DataContractJsonSerializer. Start with another good question here at SO.

如果您尝试使用某些服务,则有帖子,其中讨论了类似的问题.他们建议的是拥有一些中间层.

If you are trying to work with some services, there is post on msdn forum, where similar issue discussed. What they propose is to have some middle tier.

无论如何,使用.NET 3.5 CE所做的任何事情都会变得困难,因为老实说,这是一种过时的技术.

Anyway whatever you do with .NET 3.5 CE is going to be hard as, honestly, it is an outdated technology.

更多推荐

紧凑框架3.5是否支持System.Runtime.Serialization?

本文发布于:2023-11-10 02:21:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574077.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:紧凑   框架   Serialization   Runtime   System

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!