public IEnumerable<string> InvokeMethod(Method method, IDictionary<string, object> form)
 {
     yield return "<p>Method: " + method.Name + "</p>";
     foreach (var item in form)
     {
         yield return "<p>" + item.Key + "=" + item.Value + "</p>";
     }
 }
 public IEnumerable <string> InvokeMethod(Models.Method method, IDictionary <string, object> form)
 {
     using (var build = Build())
     {
         return(build
                .SetFormatter(new JsonFormatter().Format)
                .Controller(method.ClassName)
                .Action(method.Name)
                .Parameters(form.ToDictionary(p => p.Key, p => p.Value != null ? p.Value.ToString() : (string)null))
                .Invoke());
     }
 }
Example #3
0
 public Controller()
 {
     Methods = new Method[0];
 }