Universal Windows Platform (UWP) Serialization

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:

[DataContract]
[RemObjects.SDK.Remotable(ActivatorClass=typeof(Foo_Activator))]
[System.Reflection.ObfuscationAttribute(Exclude=true)]
public partial class Foo: RemObjects.SDK.Types.ComplexType {
    
    private int @__OID;

    private string @__StringCode

    [DataMember]
    public virtual int OID {
        get {
            return @__OID;
        }
        set {
            @__OID = value;
            this.TriggerPropertyChanged("OID");
        }
    }

    [DataMember]
    //The following line was from the original file. The project does work if it is not commented out.
    //[RemObjects.SDK.StreamAs(StreamingFormat.AnsiString)]
    public virtual string StringCode {
        get {
            return @__StringCode;
        }
        set {
            @__StringCode = value;
            this.TriggerPropertyChanged("StringCode");
        }
    }
    //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?

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

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.

Thanks, logged as bugs://77389

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

bugs://77389 got closed with status wontfix.