Ejemplo n.º 1
0
        Nullable <Guid> GetParentId(string child)
        {
            string strParent = this.GetStringParent(child);

            if (!GuidMap.ContainsKey(strParent))
            {
                Guid newGuid = Guid.NewGuid();
                GuidMap.Add(strParent, newGuid);
                return(newGuid);
            }
            Nullable <Guid> nullGuid = null;

            return((!strParent.Equals("ROOT")) ? GuidMap[strParent] : nullGuid);
        }
Ejemplo n.º 2
0
 void InitRoot()
 {
     GuidMap.Add("ROOT", Guid.NewGuid());
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a new map entry for the oldGuid. This generates a new Guid and
        /// stores a reference between the two.
        /// </summary>
        /// <param name="oldGuid">The original Guid value to be mapped from.</param>
        /// <returns>A new Guid value that should be used in place of oldGuid.</returns>
        protected Guid MapNewGuid(Guid oldGuid)
        {
            GuidMap.Add(oldGuid, Guid.NewGuid());

            return(GuidMap[oldGuid]);
        }