Skip to content

Commit ffd7881

Browse files
Fix filters applying incorrectly with not or pipe (#30)
1 parent 57129ca commit ffd7881

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ClassExplorer/MemberSearch.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public override void SearchSingleObject(PSObject pso)
9595
}
9696
}
9797

98-
AggregateFilter(member, this);
98+
AggregateFilter(member, this, isPipeFilter: true);
9999
return;
100100
}
101101

@@ -190,7 +190,7 @@ protected override void InitializeFastFilters(List<Filter<MemberInfo>> filters,
190190
{
191191
filters.AddFilter(
192192
static (member, _) => member is not MethodInfo method || !method.IsSpecialName,
193-
FilterOptions.ExcludeNot);
193+
FilterOptions.DoNotInverseNot | FilterOptions.ExcludePipeFilter);
194194
}
195195

196196
if (_options.Abstract && _options.Virtual)
@@ -235,7 +235,7 @@ protected override void InitializeFastFilters(List<Filter<MemberInfo>> filters,
235235
&& declaringType != typeof(ValueType)
236236
&& declaringType != typeof(Enum);
237237
},
238-
FilterOptions.ExcludeNot);
238+
FilterOptions.DoNotInverseNot | FilterOptions.ExcludePipeFilter);
239239
}
240240
}
241241

src/ClassExplorer/TypeSearch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public override void SearchSingleObject(PSObject pso)
5757

5858
if (pso.BaseObject is Type type)
5959
{
60-
AggregateFilter(type, this);
60+
AggregateFilter(type, this, isPipeFilter: true);
6161
return;
6262
}
6363

0 commit comments

Comments
 (0)