Exemplo n.º 1
0
        public static JsonIr ListToJSON <T>(List <T> entities_list) where T : ENTITY
        {
            if (entities_list == null)
            {
                throw new ArgumentNullException();
            }

            JsonIr irList = new JsonIr(typeof(T).Name + "_LIST");

            foreach (ENTITY e in entities_list)
            {
                irList.AppendChild(e.ToJSON());
            }
            return(irList);
        }
Exemplo n.º 2
0
 public JsonIr AppendChild(JsonIr child)
 {
     children.Add(child ?? GetIrNull());
     return(this);
 }