protected void AddSurrogateDeps <T>(T obj, Func <T, PersistentSurrogate> convert, GetDepsContext context)
 {
     if (obj != null)
     {
         PersistentSurrogate surrogate = convert(obj);
         surrogate.GetDeps(context);
     }
 }
        protected void AddSurrogateDeps(PersistentSurrogate surrogate, GetDepsContext context)
        {
            if (surrogate == null)
            {
                return;
            }

            surrogate.GetDeps(context);
        }
 protected void AddSurrogateDeps <T>(List <T> surrogateList, GetDepsContext context) where T : PersistentSurrogate
 {
     if (surrogateList == null)
     {
         return;
     }
     for (int i = 0; i < surrogateList.Count; ++i)
     {
         PersistentSurrogate surrogate = surrogateList[i];
         surrogate.GetDeps(context);
     }
 }
 protected void AddSurrogateDeps <T>(T[] surrogateArray, GetDepsContext context) where T : PersistentSurrogate
 {
     if (surrogateArray == null)
     {
         return;
     }
     for (int i = 0; i < surrogateArray.Length; ++i)
     {
         PersistentSurrogate surrogate = surrogateArray[i];
         surrogate.GetDeps(context);
     }
 }
        protected void AddSurrogateDeps <T, V>(Dictionary <T, V> surrogateDict, GetDepsContext context)
        {
            if (surrogateDict == null)
            {
                return;
            }

            foreach (KeyValuePair <T, V> kvp in surrogateDict)
            {
                PersistentSurrogate surrogate = kvp.Key as PersistentSurrogate;
                if (surrogate != null)
                {
                    surrogate.GetDeps(context);
                }

                surrogate = kvp.Value as PersistentSurrogate;
                if (surrogate != null)
                {
                    surrogate.GetDeps(context);
                }
            }
        }
 protected void AddSurrogateDeps <T>(HashSet <T> objHs, Func <T, PersistentSurrogate> convert, GetDepsContext context)
 {
     if (objHs == null)
     {
         return;
     }
     foreach (T obj in objHs)
     {
         if (obj != null)
         {
             PersistentSurrogate surrogate = convert(obj);
             surrogate.GetDeps(context);
         }
     }
 }
 protected void AddSurrogateDeps <T>(List <T> objList, Func <T, PersistentSurrogate> convert, GetDepsContext context)
 {
     if (objList == null)
     {
         return;
     }
     for (int i = 0; i < objList.Count; ++i)
     {
         T obj = objList[i];
         if (obj != null)
         {
             PersistentSurrogate surrogate = convert(obj);
             surrogate.GetDeps(context);
         }
     }
 }
 protected void AddSurrogateDeps <T>(T[] objArray, Func <T, PersistentSurrogate> convert, GetDepsContext context)
 {
     if (objArray == null)
     {
         return;
     }
     for (int i = 0; i < objArray.Length; ++i)
     {
         T obj = objArray[i];
         if (obj != null)
         {
             PersistentSurrogate surrogate = convert(obj);
             surrogate.GetDeps(context);
         }
     }
 }