C# Class System.Runtime.Serialization.ObjectHolder

ファイルを表示 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
AddDependency void
AddFixup void
DecrementFixupsRemaining void
IncrementDescendentFixups void
MarkForCompletionWhenAvailable void
ObjectHolder System.Diagnostics
ObjectHolder System.Diagnostics
ObjectHolder System.Diagnostics
RemoveDependency void
SetFlags void
SetObjectValue void
UpdateData void
UpdateDescendentDependencyChain void

Private Methods

Method Description
AddDependency ( long dependentObject ) : void

Note an object which is dependent on the one which will be contained in this ObjectHolder. Dependencies should only be added if the object hasn't yet been added. NB: An incomplete object counts as having no object.

AddFixup ( FixupHolder fixup, ObjectManager manager ) : void

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.

DecrementFixupsRemaining ( ObjectManager manager ) : void
IncrementDescendentFixups ( int amount ) : void
MarkForCompletionWhenAvailable ( ) : void
ObjectHolder ( long objID ) : System.Diagnostics
ObjectHolder ( object obj, long objID, SerializationInfo info, ISerializationSurrogate surrogate, long idOfContainingObj, FieldInfo field, int arrayIndex ) : System.Diagnostics
ObjectHolder ( string obj, long objID, SerializationInfo info, ISerializationSurrogate surrogate, long idOfContainingObj, FieldInfo field, int arrayIndex ) : System.Diagnostics
RemoveDependency ( long id ) : void

Removes a dependency of the object represented in this holder. This is normally the result of the dependency having been filled when the object is going to be only partially completed. If we plan to fully update the object, we do not take the work to do this.

SetFlags ( ) : void

An internal-only routine to set the flags based upon the data contained in the ObjectHolder

SetObjectValue ( object obj, ObjectManager manager ) : void
UpdateData ( object obj, SerializationInfo info, ISerializationSurrogate surrogate, long idOfContainer, FieldInfo field, int arrayIndex, ObjectManager manager ) : void

Update the data in the object holder. This should be called when the object is finally registered. Presumably the ObjectHolder was created to track some dependencies or preregistered fixups and we now need to actually record the object and other associated data. We take this opportunity to set the flags so that we can do some faster processing in the future.

UpdateDescendentDependencyChain ( int amount, ObjectManager manager ) : void

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.