Circular dependencies detection problem
See original GitHub issueI got exception about circular dependencies, but there are no circular dependencies just same property types and same object. Just show code instead of 1000 words
using ExtendedXmlSerializer;
using ExtendedXmlSerializer.Configuration;
var sameInnerObject = new InnerObject { Id = 100 };
var testRootObject = new RootObject
{
Item1 = sameInnerObject,
Item2 = null,
List = new List<InnerObject>
{
sameInnerObject
}
};
var serialized = new ConfigurationContainer().Create().Serialize(testRootObject);
Console.WriteLine("Success");
public class RootObject
{
// This is the same object type as Item2 but can have other value
public InnerObject? Item1 { get; set; }
// This is the same object type as Item1 but can have other value
public InnerObject? Item2 { get; set; }
//Should have the same object as Item1 or Item2
public List<InnerObject> List { get; set; } = new();
}
public class InnerObject
{
public int Id { get; set; }
}
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How do I detect circular logic or recursion in a multi-levels ...
One way to detect circular dependency is to keep a record of the length of the dependency chains that your ordering algorithm detects....
Read more >My Experience with Circular Dependencies in JavaScript
How to Detect Circular Dependencies? · Error messages or warnings that mention circular dependencies · Unexpected behaviour or results that ...
Read more >How to fix nasty circular dependency issues once and for ...
Fix attempt 1. So, it turns out that our circular dependency causes a nasty problem. However, if we look closely it is pretty...
Read more >Circular dependency
In software engineering, a circular dependency is a relation between two or more modules which either directly or indirectly depend on each other...
Read more >Google Sheets Circular Dependency Detected Error [Easy ...
As the name suggests, circular dependency creates a loop where variables are dependent on each other. Fixing this error relies on breaking the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright @UladimirLameyko you should be able to get the latest NuGet with this change here: https://www.nuget.org/packages/ExtendedXmlSerializer
Thank you for improving ExtendedXmlSerializer. Happy Holidays out there 🎄⛄🌟
It is actually incredible to see your fix so fast. Thank you very much. 😎 Will you create a new release with that fix?