コード例 #1
0
ファイル: Definition.cs プロジェクト: GerHobbelt/bebop
 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)));
 }
コード例 #2
0
ファイル: Definition.cs プロジェクト: GerHobbelt/bebop
 /// <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);