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!

ObjectIDGenerator.GetId

Returns the ID for the specified object, generating a new one if this object has not been 'seen' already by the ObjectIDGenerator in its lifetime.

[Visual Basic]
Overridable Public Function GetId( _
   ByVal obj As Object, _
   ByRef firstTime As Boolean _
) As Long
[C#]
public virtual long GetId(
   object obj,
   ref bool firstTime
);
[C++]
public: virtual __int64 GetId(
   Object* obj,
   bool** firstTime
);
[JScript]
public function GetId(
   obj : Object,
   firstTime : Boolean
) : long;

Parameters

obj
The object for which we want an ID
firstTime
Set to true if obj was not previously known to the ObjectIDGenerator; otherwise, false.

Return Value

The object's ID used for serialization. firstTime is set to true if this is the first time that this particular object has been seen; otherwise, it is set to false.

Exceptions

Exception Type Condition
ArgumentNullException The obj parameter is a null reference (in Visual Basic Nothing).

See Also

ObjectIDGenerator Class | ObjectIDGenerator Members | System.Runtime.Serialization Namespace