/// <summary> /// Automatically assigns a UID to items that do not already have one. /// </summary> public void ResolveUIDs() { foreach (T item in this) { if (string.IsNullOrEmpty(item.UID)) { item.UID = m_UIDFactory.Build(); } } }
protected void HandleItemAdded(T item) { // Assign the item a UID if it's loaded. if (item.IsLoaded && item.UID == null) { item.UID = m_UIDFactory.Build(); } item.UIDChanged += UIDChangedHandler; if (item.UID != null) { m_Dictionary[item.UID] = item; } }