System.Runtime.Serialization.ObjectManager.RegisterFixup C# (CSharp) Method

RegisterFixup() private method

Do the actual grunt work of recording a fixup and registering the dependency. Create the necessary ObjectHolders and use them to do the addition.
private RegisterFixup ( FixupHolder fixup, long objectToBeFixed, long objectRequired ) : void
fixup FixupHolder The FixupHolder to be added.
objectToBeFixed long The id of the object requiring the fixup.
objectRequired long The id of the object required to do the fixup.
return void
        private void RegisterFixup(FixupHolder fixup, long objectToBeFixed, long objectRequired)
        {
            //Record the fixup with the object that needs it.
            ObjectHolder ohToBeFixed = FindOrCreateObjectHolder(objectToBeFixed);
            ObjectHolder ohRequired;

            if (ohToBeFixed.RequiresSerInfoFixup && fixup._fixupType == FixupHolder.MemberFixup)
            {
                throw new SerializationException(SR.Serialization_InvalidFixupType);
            }

            //Add the fixup to the list.
            ohToBeFixed.AddFixup(fixup, this);

            //Find the object on which we're dependent and note the dependency.
            //These dependencies will be processed when the object is supplied.
            ohRequired = FindOrCreateObjectHolder(objectRequired);

            ohRequired.AddDependency(objectToBeFixed);

            _fixupCount++;
        }