예제 #1
0
 public void Evaluate(int SpreadMax)
 {
     if (Input.IsChanged)
     {
         XmlOut.SliceCount = JsonObjOut.SliceCount = JsonOut.SliceCount = ErrorOut.SliceCount = Input.SliceCount;
         for (int i = 0; i < Input.SliceCount; i++)
         {
             try
             {
                 JsonObjOut[i] = YamlToJson.ParseYamlToJson(Input[i]);
                 JsonOut[i]    = JsonObjOut[i].ToString();
                 XmlOut[i]     = JsonObjOut[i].AsXElement();
                 ErrorOut[i]   = null;
             }
             catch (Exception e)
             {
                 ErrorOut[i] = e;
             }
         }
     }
 }
예제 #2
0
        public void YamlTest()
        {
            var json = YamlToJson.ParseYamlToJson(YamlText);

            Assert.False(((JObject)json["content"]).ContainsKey("<<"));
        }