At the same time there's nothing stopping you from implementing the desired behaviour yourself, here's a method you can stick in your base class that should do what you want:
public class ExampleWebService {
public object MapRequestToExec(params string[] args)
{
var mi = GetType().GetMethods()
.First(x => x.Name == "Exec"
&& x.GetParameters().Length == args.Length);
if (mi == null)
throw new Exception("Method not found matching params: " + args);
var miParams = mi.GetParameters();
var castedParams = new List<object>();
for (var i=0; i<miParams.Length; i++)
{
var param = miParams[i];
var arg = args[i];
var val = TypeSerializer.DeserializeFromString(arg, param.ParameterType);
castedParams.Add(val);
}
return mi.Invoke(this, castedParams.ToArray());
}
public object Exec(string path)
{
return string.Format("Exec(string {0})", path);
}
public object Exec(string path, int id)
{
return string.Format("Exec(string {0}, int {1})", path, id);
}
public object Exec(string path, int id, double rate)
{
return string.Format("Exec(string {0}, int {1}, double {2})", path, id, rate);
}
}
class Program
{
public static void Main (string[] args)
{
var service = new ExampleWebService();
Console.WriteLine(service.MapRequestToExec("testpath"));
Console.WriteLine(service.MapRequestToExec("testpath/10".Split('/')));
Console.WriteLine(service.MapRequestToExec("testpath/10/66.44".Split('/')));
}
}