public static byte[] HistoryComposer(KeyList <PropertyTemplate, PropertyValue[]> history, DistributedConnection connection, bool prependLength = false) { //@TODO:Test var rt = new BinaryList(); for (var i = 0; i < history.Count; i++) { rt.AddUInt8(history.Keys.ElementAt(i).Index) .AddUInt8Array(Codec.Compose(history.Values.ElementAt(i), connection)); } if (prependLength) { rt.InsertInt32(0, rt.Length); } return(rt.ToArray()); }