public string ProcessForm(string name, ArgumentTree args)
        {
            object result = QueueArena.CallResult(action, args.Children[name].Value, int.MaxValue, double.MaxValue);

            if (action is IHtmlOutputable)
            {
                ArgumentTree output = ((IHtmlOutputable)action).GetHtml(result);
                if (output != null && output.Value != null)
                {
                    return(output.Value.ToString());
                }
            }
            if (action.Output is IHtmlOutputable)
            {
                ArgumentTree output = ((IHtmlOutputable)action.Output).GetHtml(result);
                if (output != null && output.Value != null)
                {
                    return(output.Value.ToString());
                }
            }

            // Try to convert to something that is outputable
            object output3 = plugenv.ImmediateConvertTo(result, new HtmlOutputArgumentType(), 2, 200);

            if (output3 != null)
            {
                return(output3.ToString());
            }
            else
            {
                return("Done.");
            }
        }
Exemplo n.º 2
0
 public object ImmediateConvertTo(object args, IArgumentType resultType, int maxlevel, int time)
 {
     return(QueueArena.CallResult(CallableConvertTo(resultType, maxlevel), args, time, 0.0));
 }