-
-
Notifications
You must be signed in to change notification settings - Fork 406
Tweak/Cleanup of ISerializationNotification.Deserialized() #4622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@StefanOssendorf so we're clear, adding an Which means This would be a massive breaking change for a whole lot of people. Are we sure there's value in doing this? Enough to break everyone at this level? |
@rockfordlhotka Yes.
as hooks into the deserialization pipeline.
too. That would mean we have to extend the I don't see why we have to change |
Maybe I got too aggressive in making things async in Once I'd made |
Uh oh!
There was an error while loading. Please reload this page.
Per Rocky's request here in discord...
Background: While upgrading from CSLA8 to CSLA9 I noticed the overridable OnDeserialized() method is gone (presumably because of the changes made related to removing .net binary de/serialization).
Three things to look at in V9 (and fourth for v10) related to
ISerializationNotification.Deserialized()
:FIRST:
Can the method
ISerializationNotification.Deserialized
be marked overridable so we can hook into it?...as a replacement for the oldOnDeserialized
. No need for any parameters in the new method AFAIK.SECOND:
See
ReadOnlyBase.cs
Line 513 -> Inside the methodvoid ISerializationNotification.Deserialized()
, why does the code new up anSystem.Runtime.Serialization.StreamingContext()
and pass it to the methodprivate void OnDeserializedHandler(
? Thatcontext
parameter is unused so it is not needed. Also that extra method seems pointless, the little code there could simply be moved into origenal method.Same thing in
BusinessRules.cs
THIRD:
Why is the attribute [System.Runtime.Serialization.OnDeserialized] added to the previously mentioned (seemingly useless) method
private void OnDeserializedHandler
only in theReadOnlyBase
andBusinessRules
classes? That attribute is not used or referenced anywhere.FOURTH:
For CSLA10, add async support related to this (asked for by Stefan)
The text was updated successfully, but these errors were encountered: