Universal Windows Platform (UWP) Serialization


(Ryan Jantz) #1

Is there any way to generate an implementation file for UWP that uses [DataContract] and [DataMember] for serialization?

Here is a snippet of the way I would like to see the generated file appear as I have manually modified this code and got it to work:

public partial class Foo: RemObjects.SDK.Types.ComplexType {
    private int @__OID;

    private string @__StringCode

    public virtual int OID {
        get {
            return @__OID;
        set {
            @__OID = value;

    //The following line was from the original file. The project does work if it is not commented out.
    public virtual string StringCode {
        get {
            return @__StringCode;
        set {
            @__StringCode = value;
    //And whatever else goes here

It seems like the [DataMember] attribute is required even for non-string properties. In this case it didn’t make a difference if Ansi or Utf8 strings were used.

Also is there any more of a roadmap or release date for the .NETStandard as mentioned here?

(antonk) #2

What would be the purpose of these attributes? Remoting SDK serializer is not Attribute-based.

Regarding .NET Standard - there won’t be much difference between PCL and .NET Standard until .NET Standard 2.0

(Ryan Jantz) #3

I could not get my uwp project to work until I changed it to that format. Uwp doesn’t have the [System.Serializable()] available. It uses[DataContract] on the class and [DataMember] on the field or property instead. These come from the System.Runtime.Serialization namespace.

Using the original generated file to communicate with the app server works but when the generated class is passed between views within our app the serialization/deserialization fails. We are using UWP with Template10 for the MVVM framework. We have to modify the generated file to be compatible with UWP/MVVM whenever the file is regenerated.

(RemObjects) #4

Thanks, logged as bugs://77389

(antonk) #5

I’ve logged the corresponding issue. However I cannot give you any ETA on this change.