Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public string ProcessInput(IList<string> inputParameters)
  2. {
  3. string command = inputParameters[0];
  4. inputParameters.RemoveAt(0);
  5.  
  6. string result = string.Empty;
  7.  
  8. var method = tankManager.GetType().GetMethods().FirstOrDefault(x => x.Name.Contains(command));
  9.  
  10. result = (string)method.Invoke(this.tankManager, new object[] { inputParameters });
  11.  
  12. return result;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement