Пример #1
0
 public static void WriteRowArray(WritingStreamer streamer, ulong name, IEnumerable <TypedRow> array)
 {
     streamer.Write(name);
     streamer.Write((byte)DataType.Array);
     streamer.Write((byte)DataType.Row);
     streamer.Write(array.Count());
     foreach (var row in array)
     {
         if (row == null)
         {
             streamer.Write(false);
         }
         else
         {
             streamer.Write(true);
             ArowSerializer.Serialize(row, streamer, false);
         }
     }
 }
Пример #2
0
        public static bool TryReadRow(TypedRow rowScope, TypedRow newRow, ReadingStreamer streamer, string name)
        {
            var ok = ArowSerializer.TryDeserialize(newRow, streamer, false);

            if (ok)
            {
                return(true);
            }

            var map = readRowAsMap(streamer);//unconditionaly to advance stream

            var arow = rowScope as IAmorphousData;

            if (arow == null)
            {
                return(false);
            }
            if (!arow.AmorphousDataEnabled)
            {
                return(false);
            }
            arow.AmorphousData[name] = map;
            return(false);
        }
Пример #3
0
 public static void WriteRow(WritingStreamer streamer, ulong name, TypedRow row)
 {
     streamer.Write(name);
     streamer.Write((byte)DataType.Row);
     ArowSerializer.Serialize(row, streamer, false);
 }