public static async Task Serialize(this CsfStruct @this, Stream stream, byte[] buffer) { await @this.Head.Serialize(stream, buffer).ConfigureAwait(false); foreach (var i in @this.Data) { await i.Serialize(stream, buffer).ConfigureAwait(false); } }
public static void ReCount(this CsfStruct @this) { @this.Head.LabelCount = @this.Data.Count; @this.Head.StringCount = @this.Data.Select(i => i.Values.Count).Sum(); }