Esempio n. 1
0
 public override void WriteCode(ISequenceVisitor visitor, TemplateContext ctx)
 {
     base.WriteCode(visitor, ctx);
     if (!string.IsNullOrEmpty(Format))
     {
         ctx._("{0} = string.Format(@\"{1}\", {2})", Item.VariableName, JSONNode.Escape(Format), string.Join(",", FormatInputs.Select(p => p.VariableName).ToArray()));
     }
 }
Esempio n. 2
0
    public override string ToString()
    {
        string text = "{";

        foreach (KeyValuePair <string, JSONNode> item in m_Dict)
        {
            if (text.Length > 2)
            {
                text += ", ";
            }
            string text2 = text;
            text = text2 + "\"" + JSONNode.Escape(item.Key) + "\":" + item.Value.ToString();
        }
        return(text + "}");
    }