-
Notifications
You must be signed in to change notification settings - Fork 47
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
struct serialization #358
Comments
Nice grab, @aspektxxx! That's a good point. If we're serializing structures as the root instance then capturing references doesn't make sense. Although structures can technically have references, with ExtendedXmlSerializer references are intended to be captured and monitored in the context of a parent/root (class) reference that serves as the start of the object/reference graph. I have disabled the reference capturing in the case of structure roots. If you would like to capture references the suggestion is to ensure the root object is a class/reference instead. You can try out the preview of this here: Please let me know if you encounter any issues using it and/or have any additional questions/suggestions. |
Doh... looks like there's also an issue altogether with using |
Boo @aspektxxx you sunk my battleship. 😆 While I can dodge the bullet with the structure root reference, combining |
Well @Mike-EEE the fix is working great. You can merge it. |
When using version 2.0.24, given
var serializer = new ConfigurationContainer() .EnableParameterizedContentWithPropertyAssignments() .EnableReferences() .Create();
when root object for graph to serialize is structvar v = new vector(new length(11), new length(13));
an exception is raisedSystem.ArgumentNullException : Value cannot be null. Parameter name: key
required definitions:
The text was updated successfully, but these errors were encountered: