예제 #1
0
        public static bool DoWrite <T>(IWriter writer, List <T> val, string name, WritCallback <T> call)
        {
            if (!writer.ArrayBegin(val.Count, name))
            {
                return(false);
            }

            for (int i = 0; i < val.Count; ++i)
            {
                call(writer, val[i], null);
            }

            return(writer.ArrayEnd());
        }
예제 #2
0
        public static bool DoWrite <T, L>(IWriter writer, FixedArray <T, L> val, string name, WritCallback <T> call)
            where T : new()
            where L : IArrayLength, new()
        {
            for (int i = 0; i < val.Length; ++i)
            {
                //string valName = string.Format("{0}_{1}", string.IsNullOrEmpty(name) ? "" : name, i);
                call(writer, val[i], null);
            }

            return(true);
        }