[*]
What about?
expected.ShouldBeEquivalentTo(actualA, options => options.Excluding(su =>
(su.RuntimeType == typeof(ClassB)) && (su.PropertyPath.EndsWith("Id")));`
Or you could do a RegEx match on the property path, such as
expected.ShouldBeEquivalentTo(actualA, options => options.Excluding(su => (Regex.IsMatch
("Children\[.+\]\.ID"));
I actually like that last one, but the regex stuff makes it a bit difficult to read. Maybe I should extend ISubjectInfo with a method to match the path against a wildcard pattern, so that you can do this:
expected.ShouldBeEquivalentTo(actualA, options => options
.Excluding(su => su.PathMatches("Children[*].ID")));