public class ObjectManager
|
The ObjectManager follows a set of rules that dictate the fixup order. All objects that implement ISerializable or have an ISerializationSurrogate can expect to have all the objects that they transmitted through SerializationInfo available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the IDeserializationCallback interface, and execute the code only when it is called back on this interface.
ctor #1 | Initializes a new instance of the ObjectManager class. |
DoFixups | Performs all the recorded fixups. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetObject | Returns the object with the specified object ID. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
RaiseDeserializationEvent | Raises the deserialization event to any registered object that implements IDeserializationCallback. |
RecordArrayElementFixup | Overloaded:RecordArrayElementFixup(long arrayToBeFixed, int index, long objectRequired) Records a fixup for one element in an array. |
RecordArrayElementFixup | Overloaded:RecordArrayElementFixup(long arrayToBeFixed, int[] indices, long objectRequired) Records fixups for the specified elements in an array to be executed later. |
RecordDelayedFixup | Records a fixup for an object member to be executed later. |
RecordFixup | Records a fixup for a member of an object to be executed later. |
RegisterObject | Overloaded:RegisterObject(object obj, long objectID) Registers an object as it is deserialized, associating it with objectID. |
RegisterObject | Overloaded:RegisterObject(object obj, long objectID, SerializationInfo info) Registers an object as it is deserialized, associating it with objectID, and recording the SerializationInfo used with it. |
RegisterObject | Overloaded:RegisterObject(object obj, long objectID, SerializationInfo info, long idOfContainingObj, MemberInfo member) Registers a member of an object as it is deserialized, associating it with objectID, and recording the SerializationInfo. |
RegisterObject | Overloaded:RegisterObject(object obj, long objectID, SerializationInfo info, long idOfContainingObj, MemberInfo member, int[] arrayIndex) Registers a member of an array contained in an object while it is deserialized, associating it with objectID, and recording the SerializationInfo. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public ObjectManager( |
selector
context
public virtual void DoFixups(); |
Exception Type | Condition |
---|---|
SerializationException | A fixup was not successfully completed. |
~ObjectManager(); |
public virtual int GetHashCode(); |
objectID
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | The objectID parameter is less than or equal to zero. |
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual void RaiseDeserializationEvent(); |
public virtual void RecordArrayElementFixup( |
arrayToBeFixed
index
objectRequired
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | The arrayToBeFixed or objectRequired parameter is less than or equal to zero. |
ArgumentNullException | The index parameter is null. |
public virtual void RecordArrayElementFixup( |
arrayToBeFixed
indices
objectRequired
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | The arrayToBeFixed or objectRequired parameter is less than or equal to zero. |
ArgumentNullException | The indices parameter is null. |
public virtual void RecordDelayedFixup( |
objectToBeFixed
memberName
objectRequired
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | objectToBeFixed or objectRequired parameter is less than or equal to zero. |
ArgumentNullException | The memberName parameter is null. |
public virtual void RecordFixup( |
objectToBeFixed
member
objectRequired
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | The objectToBeFixed or objectRequired parameter is less than or equal to zero. |
ArgumentNullException | The member parameter is null. |
obj
objectID
Exception Type | Condition |
---|---|
ArgumentNullException | The obj parameter is null. |
ArgumentOutOfRangeException | The objectID parameter is less than or equal to zero. |
SerializationException | The objectID has already been registered for an object other than obj. |
public void RegisterObject( |
obj
objectID
info
Exception Type | Condition |
---|---|
ArgumentNullException | The obj parameter is null. |
ArgumentOutOfRangeException | The objectID parameter is less than or equal to zero. |
SerializationException | The objectID has already been registered for an object other than obj. |
public void RegisterObject( |
obj
objectID
info
idOfContainingObj
member
Exception Type | Condition |
---|---|
ArgumentNullException | The obj parameter is null. |
ArgumentOutOfRangeException | The objectID parameter is less than or equal to zero. |
SerializationException | The objectID has already been registered for an object other than obj, or member is not a FieldInfo and member is not null. |
ObjectManager retains information about both the object and its ID. Later during deserialization, ObjectManager.GetObject can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized.
public void RegisterObject( |
obj
objectID
info
idOfContainingObj
member
arrayIndex
Exception Type | Condition |
---|---|
ArgumentNullException | The obj parameter is null. |
ArgumentOutOfRangeException | The objectID parameter is less than or equal to zero. |
SerializationException | The objectID has already been registered for an object other than obj, or member is not a FieldInfo and member isn't null. |
ObjectManager retains information about both the object and its ID. Later during deserialization, ObjectManager.GetObject can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized.
public virtual string ToString(); |