-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugSomething isn't workingSomething isn't working
Description
This example will course a endless loop on private properties of Type.
Is this intended behavior? How do I fix this.
class TypeReference
{
private Type _type;
public string AssemblyQualifiedName { get; set; }
public Type GetTypeInt() => _type;
public TypeReference(Type type)
{
_type = type;
AssemblyQualifiedName = type.AssemblyQualifiedName;
}
}
class StaticValueProvider
{
public TypeReference Source { get; set; }
public object Value { get; set; }
}
var staticValueProvider = new StaticValueProvider()
{
Source = new TypeReference(typeof(string)),
Value = "wa"
};
var staticValueProvider2 = new StaticValueProvider()
{
Source = new TypeReference(typeof(string)),
Value = "wa"
};
var differences1 = staticValueProvider.Diff(staticValueProvider2);
If I do this comparison it works, but fields can be public.
var differences1 = staticValueProvider.Diff(staticValueProvider2,
ComparisonOptions.ExcludeList |
ComparisonOptions.CompareCollections |
// ComparisonOptions.CompareFields |
ComparisonOptions.CompareProperties);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working