You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor GetMethodInfo and add helper methods
Note: this refactoring 100% AI generated and was not tested
Refactored the GetMethodInfo method to improve readability and modularity by breaking down its logic into smaller, focused methods: IsValidUpdate, GetCommandParts, IsCommandValid, AddArguments, and FindMatchingMethods. The FindMatchingMethods method now returns a list of matching methods and throws an AmbiguousMatchException if multiple methods are found. The ObjectHelpers.TryConvertParameters call has been moved inside FindMatchingMethods, and the _args list is cleared and repopulated with converted arguments if a single matching method is found.