Exemplo n.º 1
0
 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>";
     }
 }
Exemplo n.º 2
0
 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());
     }
 }
Exemplo n.º 3
0
 public Controller()
 {
     Methods = new Method[0];
 }