How to binary serialize a class in a Portable Class Library?

I'm using a Portable Class Library in my asp.net application and when deploying to Azure my session state needs to be serialized. Classes from this PCL don't have the SerializableAttribute sinds that's not available in the framework subset. Can't I put these classes in the ASP.NET session?


Well, you can use one of the available 3rd party serializers that are available for the Portable Class Library:

  • protobuf-net - binary
  • Json.NET
  • Both are available on NuGet

    链接地址: http://www.djcxy.com/p/11812.html

    上一篇: 在Episerver MVC中渲染块

    下一篇: 如何在可移植类库中序列化一个类?