private void copyChildren <K, V>(IDictionary <K, V> originalDictionary, IDictionary <K, V> dictionaryCopy, CopySession session) { foreach (var element in originalDictionary) { dictionaryCopy.Add((K)session.CopyOf(element.Key), (V)session.CopyOf(element.Value)); } }
private void copyChildren <T>(ICollection <T> originalCollection, ICollection <T> collectionCopy, CopySession session) { foreach (var element in originalCollection) { collectionCopy.Add((T)session.CopyOf(element)); } }
private void copyChildren <T>(T[] originalArray, T[] arrayCopy, CopySession session) { for (int i = 0; i < originalArray.Length; i++) { arrayCopy[i] = (T)session.CopyOf(originalArray[i]); } }
public void Copy(object originalObject, object objectCopy, CopySession session) { this.setter(objectCopy, Attribute.DoCopy ? session.CopyOf(this.getter(originalObject)) : null); }