protected void AddSurrogateDeps <T>(T obj, Func <T, PersistentSurrogate> convert, GetDepsFromContext context) { if (obj != null) { PersistentSurrogate surrogate = convert(obj); surrogate.GetDepsFrom(obj, context); } }
protected void AddSurrogateDeps <T, V, T1, V1>(Dictionary <T, V> dict, Func <T, T1> convertKey, Func <V, V1> convertValue, GetDepsFromContext context) { if (dict == null) { return; } foreach (KeyValuePair <T, V> kvp in dict) { T obj = kvp.Key; PersistentSurrogate surrogate = convertKey(obj) as PersistentSurrogate; if (surrogate != null) { surrogate.GetDepsFrom(obj, context); } surrogate = convertValue(kvp.Value) as PersistentSurrogate; if (surrogate != null) { surrogate.GetDepsFrom(obj, context); } } }
protected void AddSurrogateDeps <T>(HashSet <T> objHs, Func <T, PersistentSurrogate> convert, GetDepsFromContext context) { if (objHs == null) { return; } foreach (T obj in objHs) { if (obj != null) { PersistentSurrogate surrogate = convert(obj); surrogate.GetDepsFrom(obj, context); } } }
protected void AddSurrogateDeps <T>(List <T> objList, Func <T, PersistentSurrogate> convert, GetDepsFromContext 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.GetDepsFrom(obj, context); } } }
protected void AddSurrogateDeps <T>(T[] objArray, Func <T, PersistentSurrogate> convert, GetDepsFromContext 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.GetDepsFrom(obj, context); } } }