We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa00865 commit 09df58cCopy full SHA for 09df58c
src/AspectCore.Core/Configuration/Predicates.cs
@@ -10,8 +10,10 @@ public static AspectPredicate ForNameSpace(string nameSpace)
10
{
11
throw new ArgumentNullException(nameof(nameSpace));
12
}
13
-
14
- return method => method.DeclaringType.Namespace.Matches(nameSpace);
+
+ return method => nameSpace == method.DeclaringType.Namespace ||
15
+ (method.DeclaringType.Namespace != null &&
16
+ method.DeclaringType.Namespace.Matches(nameSpace));
17
18
19
public static AspectPredicate ForService(string service)
@@ -84,4 +86,4 @@ public static AspectPredicate Implement(Type baseOrInterfaceType)
84
86
return methodInfo => baseOrInterfaceType.IsAssignableFrom(methodInfo.DeclaringType);
85
87
88
-}
89
+}
0 commit comments