/// <summary> /// Selects a collection to define exclusions at. /// Allows to navigate deeper by using <see cref="For{TNext}"/>. /// </summary> public NestedExclusionOptionBuilder <TExpectation, TNext> For <TNext>(Expression <Func <TExpectation, IEnumerable <TNext> > > expression) { var selectionRule = new ExcludeMemberByPathSelectionRule(expression.GetMemberPath()); AddSelectionRule(selectionRule); return(new NestedExclusionOptionBuilder <TExpectation, TNext>(this, selectionRule)); }
internal NestedExclusionOptionBuilder(EquivalencyAssertionOptions <TExpectation> capturedAssertionOptions, ExcludeMemberByPathSelectionRule currentPathSelectionRule) { this.capturedAssertionOptions = capturedAssertionOptions; this.currentPathSelectionRule = currentPathSelectionRule; }