/// <summary> /// Gets the persisten ID of the current IITObject. /// </summary> /// <returns> /// A PersistentID that represents this IITObject or PersistentID.Empty if this /// instance does not derive from IITObject. /// </returns> protected PersistentID GetPersistentID(IITObject obj) { if (persistentID.IsEmpty) { int high = 0; int low = 0; if (itunes != null) { Invoke((Action) delegate { object refobj = obj; itunes.GetITObjectPersistentIDs(ref refobj, out high, out low); // do not Release(refobj) here or we'll blow away the original obj! }); } return(new PersistentID(high, low)); } return(persistentID); }