NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ObjectManager.RegisterObject (Object, Int64)

Registers an object as it is deserialized.

[Visual Basic]
Overloads Overridable Public Sub RegisterObject( _
   ByVal obj As Object, _
   ByVal objectID As Long _
)
[C#]
public virtual void RegisterObject(
   object obj,
   long objectID
);
[C++]
public: virtual void RegisterObject(
   Object* obj,
   __int64 objectID
);
[JScript]
public function RegisterObject(
   obj : Object,
   objectID : long
);

Parameters

obj
The object to be registered.
objectID
The ID of the object to be registered.

Exceptions

Exception Type Condition
ArgumentNullException The obj parameter is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException The objectID parameter is less than or equal to zero.
SerializationException The objectID has already been registered for an object other than obj.

Remarks

ObjectManager remembers both the object and its ID. Later during deserialization, 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.

See Also

ObjectManager Class | ObjectManager Members | System.Runtime.Serialization Namespace | ObjectManager.RegisterObject Overload List