internal void ReadCrossAppDomainMap()
{
BinaryCrossAppDomainMap record = new BinaryCrossAppDomainMap();
record.Read(this);
object mapObject = _objectReader.CrossAppDomainArray(record._crossAppDomainArrayIndex);
BinaryObjectWithMap binaryObjectWithMap = mapObject as BinaryObjectWithMap;
if (binaryObjectWithMap != null)
{
ReadObjectWithMap(binaryObjectWithMap);
}
else
{
BinaryObjectWithMapTyped binaryObjectWithMapTyped = mapObject as BinaryObjectWithMapTyped;
if (binaryObjectWithMapTyped != null)
{
ReadObjectWithMapTyped(binaryObjectWithMapTyped);
}
else
{
throw new SerializationException(SR.Format(SR.Serialization_CrossAppDomainError, "BinaryObjectMap", mapObject));
}
}
}