Build() public method

public Build ( ) : string
return string
Exemplo n.º 1
0
 /// <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();
         }
     }
 }
Exemplo n.º 2
0
        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;
            }
        }