public void TightMarshalNestedObject2(DataStructure o, BinaryWriter ds, BooleanStream bs)
{
if (!bs.ReadBoolean())
{
return;
}
byte type = o.GetDataStructureType();
ds.Write(type);
if (o.IsMarshallAware() && bs.ReadBoolean())
{
MarshallAware ma = (MarshallAware)o;
byte[] sequence = ma.GetMarshalledForm(this);
ds.Write(sequence, 0, sequence.Length);
}
else
{
BaseDataStreamMarshaller dsm = (BaseDataStreamMarshaller)dataMarshallers[type & 0xFF];
if (dsm == null)
{
throw new IOException("Unknown data type: " + type);
}
dsm.TightMarshal2(this, o, ds, bs);
}
}