コード例 #1
0
        protected IList ConvertToDTOList(IList list)
        {
            IList dtoList = new ArrayList();

            Type[]   arrayType = new Type[1];
            Object[] arrayObj  = new Object[1];

            arrayType[0] = PersistentType;
            ConstructorInfo constructor = DTOType.GetConstructor(arrayType);

            foreach (Persistent item in list)
            {
                arrayObj[0] = item;
                dtoList.Add(constructor.Invoke(arrayObj));
            }

            return(dtoList);
        }