AnyDiff icon indicating copy to clipboard operation
AnyDiff copied to clipboard

System.NotSupportedException thrown for AllowCollectionsToBeOutOfOrder flag

Open azme94 opened this issue 2 years ago • 0 comments

var diff = list1.Diff(list2, ComparisonOptions.All | ComparisonOptions.AllowCollectionsToBeOutOfOrder | ComparisonOptions.AllowEqualsOverride);

throws System.NotSupportedException pointing at IEnumerator.Reset() . I want to ignore ordering differences in lists. I tried igoring, but still getting it. Could you check this one please ? Version is 1.0.88

[IgnoreDataMember]
[JsonIgnore]
public virtual IEnumerable<string> SomeEnumerableIds
{
     get { yield return this.someStringId; }
}

System.NotSupportedException: Specified method is not supported. at ***********.****Entity.get_SomeEnumerableIds()+ System.Collections.IEnumerator.Reset() at AnyDiff.DiffProvider.GetDifferences(String propertyName, Type propertyType, TypeConverter typeConverter, IEnumerable1 attributes, Object left, Object right, Object parent, List1 differences, Int32 currentDepth, Int32 maxDepth, <37c2b6f9-1728-45df-bb6e-473d4690fe19>ObjectHashcodeMap objectTree, String path, ComparisonOptions options, ICollection1 propertiesToExcludeOrInclude, DiffOptions diffOptions) at AnyDiff.DiffProvider.RecurseProperties(Object left, Object right, Object parent, List1 differences, Int32 currentDepth, Int32 maxDepth, <37c2b6f9-1728-45df-bb6e-473d4690fe19>ObjectHashcodeMap objectTree, String path, ComparisonOptions comparisonOptions, ICollection1 propertiesToExcludeOrInclude, DiffOptions diffOptions) at AnyDiff.DiffProvider.ComputeDiff[T](T left, T right, Int32 maxDepth, ComparisonOptions comparisonOptions, DiffOptions diffOptions, Expression1[] propertiesToExcludeOrInclude) at AnyDiff.Extensions.Extensions.Diff[T](T left, T right, Int32 maxDepth, ComparisonOptions comparisonOptions, DiffOptions diffOptions, Expression1[] propertiesToExcludeOrInclude) at AnyDiff.Extensions.Extensions.Diff[T](T left, T right, ComparisonOptions comparisonOptions, Expression1[] propertiesToExcludeOrInclude)

azme94 avatar Feb 07 '23 19:02 azme94