OnDeserialized dissappeared in 8? #3893
-
Taking a stab at upgrading our .net 6 projects to .net 8. protected override void UndoChangesComplete()
{
base.UndoChangesComplete();
HookEventHandlers();
}
protected override void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
{
base.OnDeserialized(context);
HookEventHandlers();
} The error says "DataExtension.OnDeserialized(StreamContext) : no suitable method found to override |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
I'm not sure what to do with a DataSet. Microsoft is in the process of deprecating and removing BinaryFormatter, and it will be gone in .NET 9. As a result, CSLA no longer supports BinaryFormatter, and the The DataSet (I think?) needs BinaryFormatter to be serialized. Perhaps I'm wrong - I haven't actually used a DataSet in a very long time. Because, at least right now, the only serializer supported by CSLA is MobileFormatter, you should be able to override the methods from IMobileObject (or equivalents from the base classes) to know when state and children have been set into your object instance on deserialization. Right now there's no "final method" invoked once the full graph has been deserialized, but individual objects in the graph can override things like |
Beta Was this translation helpful? Give feedback.
The parent BO should be able to override
OnSetChildren
:If that doesn't work, we might have to consider something more like
OnDeserialized
in MobileFormatter.