File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Source/Libraries/GSF.TimeSeries Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2089,7 +2089,13 @@ protected virtual void InvokeRequestHandler(ClientRequestInfo requestInfo)
20892089 try
20902090 {
20912091 // See if method exists with specified name using reflection
2092- MethodInfo method = adapter . GetType ( ) . GetMethod ( command , BindingFlags . Public | BindingFlags . Static | BindingFlags . Instance | BindingFlags . IgnoreCase ) ;
2092+ MethodInfo method = adapter
2093+ . GetType ( )
2094+ . GetMethods ( BindingFlags . Public | BindingFlags . Static | BindingFlags . Instance | BindingFlags . IgnoreCase )
2095+ . Where ( method => method . Name == command )
2096+ . Where ( method => method . TryGetAttribute ( out AdapterCommandAttribute _ ) )
2097+ . Select ( ( method , index ) => index == 0 ? method : throw new AmbiguousMatchException ( ) )
2098+ . LastOrDefault ( ) ;
20932099
20942100 // Invoke method
20952101 if ( method is not null )
You can’t perform that action at this time.
0 commit comments