예제 #1
0
        public object ReadValueFromXml(Type type)
        {
            string value = reader.ReadElementString();
            object par   = null;

            PropertyParser.TryParseObject(value, type, ref par);
            return(par);
        }
예제 #2
0
        public object ReadPropertyFromXml(object parent, Type parentType, out PropertyInfo pInfo)
        {
            object ret  = null;
            string name = reader.ReadElementString();

            pInfo = PropertyParser.getParseableProperty(parentType, name);
            if (pInfo == null)
            {
                return(null);
            }
            ret = InvokeGetOrCreate(parent, pInfo);
            ret = ReadObjectFromXml(ret, pInfo.PropertyType);
            return(ret);
        }