Skip to content

Commit 517ee95

Browse files
committed
Handle raise_ method. Fix #74.
No tests.
1 parent 004a9e7 commit 517ee95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ReflectionAnalyzers/NodeAnalzers/GetXAnalyzer.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ private static bool IsPreferGetMemberThenAccessor(InvocationExpressionSyntax get
214214
call = $"{memberAccess.Expression}.GetEvent({MemberName(eventSymbol)}, {flags.ToDisplayString()}).RemoveMethod";
215215
return true;
216216
}
217+
218+
if (targetMethod.Name.StartsWith("raise_", StringComparison.OrdinalIgnoreCase))
219+
{
220+
call = $"{memberAccess.Expression}.GetEvent({MemberName(eventSymbol)}, {flags.ToDisplayString()}).RaiseMethod";
221+
return true;
222+
}
217223
}
218224
}
219225

0 commit comments

Comments
 (0)