public List<Object> GenerateHelperItemList(List<object> itemList)
        {
            var parentWrapperList = new List<Object>();
            foreach (var item in itemList)
            {
                if (item is IParentObject)
                {
                    var parentWrapper = new ParentWrapper(item, _currentId);
                    _currentId++;
                    parentWrapperList.Add(parentWrapper);
                }
                else
                {
                    parentWrapperList.Add(item);
                }
            }

            return parentWrapperList;
        }
示例#2
0
        public List <Object> GenerateHelperItemList(List <object> itemList)
        {
            var parentWrapperList = new List <Object>();

            foreach (var item in itemList)
            {
                if (item is IParentObject)
                {
                    var parentWrapper = new ParentWrapper(item, _currentId);
                    _currentId++;
                    parentWrapperList.Add(parentWrapper);
                }
                else
                {
                    parentWrapperList.Add(item);
                }
            }

            return(parentWrapperList);
        }