예제 #1
0
파일: HmSerializer.cs 프로젝트: flwn/HmLib
        private void SerializeCollection(IObjectBuilder builder, ICollection listType)
        {
            builder.BeginArray(listType.Count);

            foreach (var item in listType)
            {
                builder.BeginItem();
                SerializeInternal(builder, item, InnerLevel);
                builder.EndItem();
            }

            builder.EndArray();
        }
예제 #2
0
        private void ConvertArrayContent(IMessageReader reader, IObjectBuilder builder)
        {
            var itemCount = reader.ItemCount;
            builder.BeginArray(itemCount);

            for (; itemCount > 0; itemCount--)
            {
                builder.BeginItem();
                reader.Read();

                ConvertValue(reader, builder);
                builder.EndItem();
            }

            builder.EndArray();
        }
예제 #3
0
        private void ConvertArrayContent(IMessageReader reader, IObjectBuilder builder)
        {
            var itemCount = reader.ItemCount;

            builder.BeginArray(itemCount);

            for (; itemCount > 0; itemCount--)
            {
                builder.BeginItem();
                reader.Read();

                ConvertValue(reader, builder);
                builder.EndItem();
            }

            builder.EndArray();
        }