private bool GetCompletionInfo(FixupHolder fixup, out ObjectHolder holder, out object member, bool bThrowIfMissing)
{
//Set the member id (String or MemberInfo) for the member being fixed up.
member = fixup._fixupInfo;
//Find the object required for the fixup. Throw if we can't find it.
holder = FindObjectHolder(fixup._id);
// CompletelyFixed is our poorly named property which indicates if something requires a SerializationInfo fixup
// or is an incomplete object reference. We have this particular branch to handle valuetypes which implement
// ISerializable. In that case, we can't do any fixups on them later, so we need to delay the fixups further.
if (!holder.CompletelyFixed)
{
if (holder.ObjectValue != null && holder.ObjectValue is ValueType)
{
SpecialFixupObjects.Add(holder);
return false;
}
}
if (holder == null || holder.CanObjectValueChange || holder.ObjectValue == null)
{
if (bThrowIfMissing)
{
if (holder == null)
{
throw new SerializationException(SR.Format(SR.Serialization_NeverSeen, fixup._id));
}
if (holder.IsIncompleteObjectReference)
{
throw new SerializationException(SR.Format(SR.Serialization_IORIncomplete, fixup._id));
}
throw new SerializationException(SR.Format(SR.Serialization_ObjectNotSupplied, fixup._id));
}
return false;
}
return true;
}