Serialize

Topics: Questions
Nov 20, 2013 at 8:07 AM
Hallo.

I have a class wich is derived from model base. This class needs to be serialisied from catel.
Now I have derived from this class.

[Serializable]
public class LocationInstance: ModelBase
{
...
}

[Serializable]
public class PlaceInstance : LocationInstance
{
...
}

Now I get a exception. ->

I need to add the KnownTypeAttribute to my baseclass to make the derived class known in the baseclass.

Not beautiful. Is there a better way with catel?
Coordinator
Nov 20, 2013 at 8:10 AM
Catel tries to determine the known types on forehand, but that is not always possible. If you can show us a failing unit test, we might be able to fix this.