Exemple #1
0
        private IList <MyMarkModel> ParseType(Type type)
        {
            var list = new List <MyMarkModel>();

            foreach (var p in type.GetProperties())
            {
                var cdm = new MyMarkModel(p, null);
                list.Add(cdm);
            }
            return(list.OrderBy(p => p.Order).ToList());
        }
Exemple #2
0
        private IList <MyMarkModel> ParseObject(object obj)
        {
            if (obj == null)
            {
                return(null);
            }

            var list = new List <MyMarkModel>();

            foreach (var p in obj.GetType().GetProperties())
            {
                var cdm = new MyMarkModel(p, obj);
                list.Add(cdm);
            }
            return(list.OrderBy(p => p.Order).ToList());
        }