Skip to content
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

System.NotSupportedException thrown for AllowCollectionsToBeOutOfOrder flag #19

Open
azme94 opened this issue Feb 7, 2023 · 0 comments

Comments

@azme94
Copy link

azme94 commented Feb 7, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant