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

AddFixup() private method

Note a fixup that has to be done before this object can be completed. Fixups are things that need to happen when other objects in the graph are added. Dependencies are things that need to happen when this object is added.
private AddFixup ( FixupHolder fixup, ObjectManager manager ) : void
fixup FixupHolder The fixup holder containing enough information to complete the fixup.
manager ObjectManager
return void
        internal void AddFixup(FixupHolder fixup, ObjectManager manager)
        {
            if (_missingElements == null)
            {
                _missingElements = new FixupHolderList();
            }
            _missingElements.Add(fixup);
            _missingElementsRemaining++;

            if (RequiresValueTypeFixup)
            {
                UpdateDescendentDependencyChain(1, manager);
            }
        }

Usage Example

コード例 #1
0
ファイル: ObjectManager.cs プロジェクト: randomize/VimConfig
        private void RegisterFixup(FixupHolder fixup, long objectToBeFixed, long objectRequired)
        {
            ObjectHolder holder = this.FindOrCreateObjectHolder(objectToBeFixed);

            if (holder.RequiresSerInfoFixup && (fixup.m_fixupType == 2))
            {
                throw new SerializationException(Environment.GetResourceString("Serialization_InvalidFixupType"));
            }
            holder.AddFixup(fixup, this);
            this.FindOrCreateObjectHolder(objectRequired).AddDependency(objectToBeFixed);
            this.m_fixupCount += 1L;
        }