override public int MinimalEncodedSize(BebopSchema schema) { // The encoding of a struct consists of a straightforward concatenation of the encodings of its fields. return(Fields.Sum(f => f.MinimalEncodedSize(schema))); }
/// <summary> /// Compute a lower bound for the size of the wire-format encoding of a packet conforming to this definition. /// </summary> /// <param name="schema">The schema this definition belongs to, used to resolve references to other definitions.</param> /// <returns>The lower bound, in bytes.</returns> public abstract int MinimalEncodedSize(BebopSchema schema);