Skip to content

Commit 61a3cfa

Browse files
committed
采纳代码审查建议
1 parent 7b7ad37 commit 61a3cfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DotNetCampus.CommandLine.Analyzer/Generators/ModelProviding/InterceptorModelProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static IncrementalValuesProvider<InterceptorGeneratingModel> SelectComman
2727
{
2828
return SelectMethodInvocationProvider(context,
2929
$"DotNetCampus.Cli.{extensionMethodThisTypeName}", "AddHandler",
30-
parameterTypeFullName.Replace(".", @"\.").Replace("<T>", @"<[\w_\.]+>").Replace("T,", @"[\w_\.]+,"));
30+
"global::" + parameterTypeFullName.Replace(".", @"\.").Replace("<T>", @"<[\w_\.]+>").Replace("T,", @"[\w_\.]+,"));
3131
}
3232

3333
public static IncrementalValuesProvider<InterceptorGeneratingModel> SelectMethodInvocationProvider(this IncrementalGeneratorInitializationContext context,
@@ -81,7 +81,7 @@ public static IncrementalValuesProvider<InterceptorGeneratingModel> SelectMethod
8181
for (var i = 0; i < parameterTypeFullNameRegexes.Length; i++)
8282
{
8383
var parameterSymbol = methodSymbol.Parameters[i];
84-
if (!Regex.Match(parameterSymbol.Type.ToDisplayString(), parameterTypeFullNameRegexes[i]).Success)
84+
if (!Regex.IsMatch(parameterSymbol.Type.ToGlobalDisplayString(), parameterTypeFullNameRegexes[i]))
8585
{
8686
// 参数类型不匹配。
8787
return null;

0 commit comments

Comments
 (0)