Exemplo n.º 1
0
        public static KafkaWriter Write(this KafkaWriter writer, Int32[] value)
        {
            if (value == null)
            {
                writer.Write(-1);
                return(writer);
            }

            writer.Write((Int32)value.Length);
            foreach (var item in value)
            {
                writer.Write(item);
            }
            return(writer);
        }
Exemplo n.º 2
0
        public static KafkaWriter Write <T>(this KafkaWriter writer, ICollection <T> value) where T : IKafkaWriteable
        {
            if (value == null)
            {
                writer.Write(-1);
                return(writer);
            }

            writer.Write((Int32)value.Count);
            foreach (var item in value)
            {
                item.SaveTo(writer);
            }
            return(writer);
        }
Exemplo n.º 3
0
 public void MarkAsStart()
 {
     _previousPosition = _writer.BaseStream.Position;
     _writer.Write(0);
 }