public static void WriteRowArray(WritingStreamer streamer, ulong name, IEnumerable <TypedDoc> array) { streamer.Write(name); streamer.Write((byte)DataType.Array); streamer.Write((byte)DataType.Doc); streamer.Write(array.Count()); foreach (var row in array) { if (row == null) { streamer.Write(false); } else { streamer.Write(true); ArowSerializer.Serialize(row, streamer, false); } } }
public static bool TryReadRow(TypedDoc docScope, TypedDoc newDoc, ReadingStreamer streamer, string name) { var ok = ArowSerializer.TryDeserialize(newDoc, streamer, false); if (ok) { return(true); } var map = readRowAsMap(streamer);//unconditionally to advance stream var arow = docScope as IAmorphousData; if (arow == null) { return(false); } if (!arow.AmorphousDataEnabled) { return(false); } arow.AmorphousData[name] = map; return(false); }
public static void WriteRow(WritingStreamer streamer, ulong name, TypedDoc doc) { streamer.Write(name); streamer.Write((byte)DataType.Doc); ArowSerializer.Serialize(doc, streamer, false); }