/
IMemberSelectionRule.cs
29 lines (27 loc) · 1.26 KB
/
IMemberSelectionRule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Collections.Generic;
namespace FluentAssertions.Equivalency
{
/// <summary>
/// Represents a rule that defines which members of the subject-under-test to include while comparing
/// two objects for structural equality.
/// </summary>
public interface IMemberSelectionRule
{
/// <summary>
/// Gets a value indicating whether this rule should override the default selection rules that include all members.
/// </summary>
bool IncludesMembers { get; }
/// <summary>
/// Adds or removes properties to/from the collection of subject members that must be included while
/// comparing two objects for structural equality.
/// </summary>
/// <param name="selectedMembers">
/// A collection of members that was prepopulated by other selection rules. Can be empty.</param>
/// <param name="context"></param>
/// <param name="config"></param>
/// <returns>
/// The collection of members after applying this rule. Can contain less or more than was passed in.
/// </returns>
IEnumerable<SelectedMemberInfo> SelectMembers(IEnumerable<SelectedMemberInfo> selectedMembers, IMemberInfo context, IEquivalencyAssertionOptions config);
}
}