ObjectIDGenerator.GetId(Object, Boolean) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne l’ID de l’objet spécifié, générant un nouvel ID si l’objet spécifié n’a pas déjà été identifié par le ObjectIDGenerator.
public:
virtual long GetId(System::Object ^ obj, [Runtime::InteropServices::Out] bool % firstTime);
public virtual long GetId(object obj, out bool firstTime);
abstract member GetId : obj * bool -> int64
override this.GetId : obj * bool -> int64
Public Overridable Function GetId (obj As Object, ByRef firstTime As Boolean) As Long
Paramètres
- obj
- Object
Objet pour lequel vous souhaitez obtenir un ID.
- firstTime
- Boolean
true s’il obj n’était pas connu précédemment au ObjectIDGenerator; sinon, false.
Retours
L’ID de l’objet est utilisé pour la sérialisation.
firstTime est défini true si c’est la première fois que l’objet a été identifié ; sinon, il est défini sur false.
Exceptions
Le obj paramètre est null.
Il ObjectIDGenerator a été demandé de garder le suivi d’un trop grand nombre d’objets.