ObjectManager::RegisterObject Method (Object^, Int64)
.NET Framework (current version)
Registers an object as it is deserialized, associating it with objectID.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityCriticalAttribute] virtual void RegisterObject( Object^ obj, long long objectID )
Parameters
- obj
-
Type:
System::Object^
The object to register.
- objectID
-
Type:
System::Int64
The ID of the object to register.
| Exception | 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. |
ObjectManager retains information about both the object and its ID. Later during deserialization, GetObject can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized.
.NET Framework
Available since 1.1
Available since 1.1
Show: