-
-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Is your feature request related to a problem? Please describe.
My private method named with an underscore generates a public property with an underscore as well. For example, the method below would generate _refreshCommand
instead of RefreshCommand
.
[ReactiveCommand]
async Task _refresh() {}
Describe the solution you'd like
Add a check to see if the method name starts with an underscore + lowercase, then replace with not underscore + uppercase.
Describe suggestions on how to achieve the feature
In ReactiveCommandGenerator.Execute.cs
modify line 192 to apply a transformation to the method name string. e.g.
var methodName = methodSymbol.Name;
if (methodName.Length > 1 && methodName[0] == '_' && char.IsLower(methodName[1]))
methodName = char.ToUpper(methodName[1]) + methodName.Substring(2);
commandExtensionInfos.Add(new(
methodName,
/*...*/));
Metadata
Metadata
Assignees
Labels
No labels