Flag classes as Serializable in C#

We have several classes that we want to be able to save in the view state (ASP.net using Azure Redis Cache).
It seems that although the parent class ComplexType is marked as serializable the child class does not.
Whenever we want to load the serialized class from the cache we get an error message saying that this class was not marked as serializable.
Is it possible to mark certain classes as serializable when converting the rodl file??

Example

[RemObjects.SDK.Remotable(ActivatorClass=typeof(THDSSrvVariant_Activator))]
[System.Reflection.ObfuscationAttribute(Exclude=true)]
public partial class THDSSrvVariant : RemObjects.SDK.Types.ComplexType {
private string @__Data;
private int @__VariantType;
[RemObjects.SDK.StreamAs(RemObjects.SDK.StreamingFormat.WideString)]
public virtual string Data {
get {
return @__Data;
}
set {
@__Data = value;
this.TriggerPropertyChanged(“Data”);
}
}

We would like it to be

[RemObjects.SDK.Remotable(ActivatorClass=typeof(THDSSrvVariant_Activator))]
[System.Reflection.ObfuscationAttribute(Exclude=true)]
[Serializable]
public partial class THDSSrvVariant : RemObjects.SDK.Types.ComplexType {
private string @__Data;
private int @__VariantType;
[RemObjects.SDK.StreamAs(RemObjects.SDK.StreamingFormat.WideString)]
public virtual string Data {
get {
return @__Data;
}
set {
@__Data = value;
this.TriggerPropertyChanged(“Data”);
}
}

Hello

Thank you for the suggestion. It was logged as 70282 and will be investigated deeper. Drop a mail at support@remobjects.com to retrieve a pre-Beta build once this feature will be implemented.

Regards

Additionally you could use a simple workaround. As all structures are generated as partial classes you need just to add a code file to your project containing code like

[Serializable]
public partial class THDSSrvVariant 
{
}

(partial classes definitions should be in the same namespace as the code in the _Intf file). Using this approach you will be able to mark the needed classes as Serializable without the need to modify the _Intf file.

This works like a charm.
Thanks