Esempio n. 1
0
    public DataNode MakeParameters(string operation, params object[] args)
    {
        var inputs = DataNode.CreateObject(null);

        inputs.AddField("operation", operation);
        DataNode argsNode = DataNode.CreateArray("args");

        foreach (object obj in args)
        {
            argsNode.AddValue(obj);
        }
        if (args.Length == 0)
        {
            argsNode.AddValue("tmp");
        }
        inputs.AddNode(argsNode);
        return(inputs);
    }