System.Runtime.Serialization.ObjectHolder.UpdateDescendentDependencyChain C# (CSharp) Method

UpdateDescendentDependencyChain() private method

Updates the total list of dependencies to account for a fixup being added or completed in a child value class. This will update all value classes containing that child and the object which contains all of them.
private UpdateDescendentDependencyChain ( int amount, ObjectManager manager ) : void
amount int the amount by which to increment (or decrement) the dependency chain.
manager ObjectManager The ObjectManager used to lookup other objects up the chain.
return void
        private void UpdateDescendentDependencyChain(int amount, ObjectManager manager)
        {
            ObjectHolder holder = this;

            //This loop walks one more object up the chain than there are valuetypes.  This
            //is because we need to increment the TotalFixups in the holders as well.
            do
            {
                holder = manager.FindOrCreateObjectHolder(holder.ContainerID);
                Debug.Assert(holder != null, "[ObjectHolder.UpdateTotalDependencyChain]holder!=null");
                holder.IncrementDescendentFixups(amount);
            } while (holder.RequiresValueTypeFixup);
        }