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);
        }
        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);
        }
 public KafkaCrc32Writer(KafkaWriter writer)
 {
     _writer = writer;
 }
Exemple #4
0
 public KafkaLengthWriter(KafkaWriter writer)
 {
     _writer = writer;;
 }