public JsList CreateList(JsFormat format, params object[] items)
 {
     JsList l = new JsList(this, items);
     l.SetFormat(format);
     return l;
 }
 public JsFunction CreateFunction(JsList parameters, JsMultiLine commands)
 {
     return CreateFunction(JsFormat.None, parameters, commands);
 }
 public JsFunction F(JsList parameters, JsMultiLine commands)
 {
     return CreateFunction(parameters, commands);
 }
示例#4
0
 public IJsExpression ToJsExpression()
 {
     return(JsList.From(Value, Text));
 }
 public JsFunction CreateFunction(JsFormat format, JsList parameters, JsMultiLine commands)
 {
     JsFunction f =  new JsFunction(this, parameters, commands);
     f.SetFormat(format);
     return f;
 }
 public static JsList ListInline(params object[] items)
 {
     JsList l = new JsList(items);
     l.MultiLine = false;
     return l;
 }
 public static JsFunction FI(JsList parameters, JsMultiLine commands)
 {
     return FunctionInline(parameters, commands);
 }
 public static JsFunction FunctionInline(JsList parameters, JsMultiLine commands)
 {
     JsFunction f = new JsFunction(parameters, commands);
     f.MultiLine = false;
     return f;
 }
        //public static JsMultiLine MultiLineIndented(params object[] lines)
        //{
        //    JsMultiLine ml = new JsMultiLine(lines);
        //    ml.NewIndent = true;
        //    ml.StartOnNewLine = true;
        //    return ml;
        //}

        //public static JsMultiLine MLI(params object[] lines)
        //{
        //    return MultiLineIndented(lines);
        //}

        //public static JsFunction Function(string parameters, JsMultiLine commands)
        //{
        //    return new JsFunction(parameters, commands);
        //}
        //public static JsFunction F(string parameters, JsMultiLine commands)
        //{
        //    return Function(parameters, commands);
        //}
        public static JsFunction Function(JsList parameters, JsMultiLine commands)
        {
            return new JsFunction(parameters, commands);
        }
示例#10
0
 public void TestFrom()
 {
     Assert.AreEqual("[123, \"345\", null]", JsList.From(123, "345", null).Encode());
 }