Check type in SerializationInfo.AddValue? #2711
Unanswered
ajohnstone-ks
asked this question in
Ideas
Replies: 1 comment
-
This makes sense to me, as long as the check isn't a performance issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're working to convert things to managed properties, as many of our older classes still use private field serialization over WCF (which we want to move away from).
Sometimes we have to implement IMobileObject ourselves for various reasons. One thing I found is that if you try to serialize an object which isn't supported, you don't find out until deserialization happens on the client and you get an unhelpful "Unknown Csla KnownType" exception.
Is there any reason that the type of the value being serialized can't be checked in SerializationInfo.AddValue, and throw an exception there that value isn't one of the types supported by mobileformatter? I think such a check would be really helpful as it took me a long time to track down exactly what the type was that was throwing that exception.
Beta Was this translation helpful? Give feedback.
All reactions