/// <summary> /// Encode the specified batches. /// </summary> /// <returns>The encode.</returns> /// <param name="batches">Batches.</param> public byte[] Encode(IEnumerable <Batch> batches) { var batchList = new BatchList(); batchList.Batches.AddRange(batches); return(batchList.ToByteArray()); }