feat: Adds TextDefinition serialization support. (#1217)
This commit is contained in:
parent
39e6f62ec9
commit
d791feb583
29 changed files with 301 additions and 267 deletions
|
|
@ -164,5 +164,27 @@ public interface IGenericWriter
|
|||
|
||||
void Write(BitArray bitArray);
|
||||
|
||||
void Write(TextDefinition def)
|
||||
{
|
||||
if (def == null)
|
||||
{
|
||||
WriteEncodedInt(3);
|
||||
}
|
||||
else if (def.Number > 0)
|
||||
{
|
||||
WriteEncodedInt(1);
|
||||
WriteEncodedInt(def.Number);
|
||||
}
|
||||
else if (def.String != null)
|
||||
{
|
||||
WriteEncodedInt(2);
|
||||
Write(def.String);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteEncodedInt(0); // Empty
|
||||
}
|
||||
}
|
||||
|
||||
long Seek(long offset, SeekOrigin origin);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue