Skip to content

Commit eedd43b

Browse files
siegfriedpammermatt
authored and
matt
committed
Fix icsharpcode#3064: Do not only match the full assembly name, but also try to match the filename when applying the "inassembly:" search filter.
1 parent b57cdae commit eedd43b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ICSharpCode.ILSpyX/Search/AbstractEntitySearchStrategy.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
using System;
2020
using System.Collections.Concurrent;
21+
using System.IO;
2122

2223
namespace ICSharpCode.ILSpyX.Search
2324
{
@@ -66,7 +67,9 @@ protected bool IsInNamespaceOrAssembly(IEntity entity)
6667
{
6768
if (searchRequest.InAssembly != null)
6869
{
69-
if (entity.ParentModule == null || !entity.ParentModule.FullAssemblyName.Contains(searchRequest.InAssembly, StringComparison.OrdinalIgnoreCase))
70+
if (entity.ParentModule?.PEFile == null ||
71+
!(Path.GetFileName(entity.ParentModule.PEFile.FileName).Contains(searchRequest.InAssembly, StringComparison.OrdinalIgnoreCase)
72+
|| entity.ParentModule.FullAssemblyName.Contains(searchRequest.InAssembly, StringComparison.OrdinalIgnoreCase)))
7073
{
7174
return false;
7275
}

0 commit comments

Comments
 (0)