public object Clone(CloneScope cloner, string propertyName, object valueFrom)
        {
            object propertyValue = ReflectionHelper.GetPropertyValue(valueFrom, propertyName);

            IList listValue = (IList)propertyValue;
            IList newList = new List<object>();

            for (int i = 0; i < listValue.Count; i++)
            {
                newList.Add(GetItemValue(cloner, listValue, i));
            }

            return newList;
        }
 protected abstract object GetItemValue(CloneScope cloner, IList originalList, int index);
        public object Clone(CloneScope cloner, string propertyName, object valueFrom)
        {
            object propertyValue = ReflectionHelper.GetPropertyValue(valueFrom, propertyName);

            return cloner.Clone(propertyValue);
        }
Exemplo n.º 4
0
 public object Clone(CloneScope cloner, string propertyName, object valueFrom)
 {
     return this.value;
 }
 protected override object GetItemValue(CloneScope cloner, IList originalList, int index)
 {
     return originalList[index];
 }
        protected override object GetItemValue(CloneScope cloner, IList originelList, int index)
        {
            object itemValue = base.GetItemValue(cloner, originelList, index);

            return cloner.Clone(itemValue);
        }