Example #1
0
        public DBPropertyConvertInfo FindBaseInfo(string _typeName)
        {
            if (_typeName.Length == 0)
            {
                return(null);
            }
            var result = Infos.Find((v) => { return(v.IsType(_typeName)); });

            if (result != null)
            {
                return(result);
            }
            else
            {
                var type = CustomEnum.Find((v) => { return(_typeName == v.Name); });

                if (type != null)
                {
                    result = new DBPropertyConvertInfo(type, null, new DBDataEnum(type), ObjectTo);
                    Infos.Add(result);
                    return(result);
                }
            }

            return(null);
        }
        public DBPropertyConvertInfo FindBaseInfo(Type _type)
        {
            var result = Infos.Find((v) => { return(v.BaseType.Equals(_type)); });

            if (result != null)
            {
                return(result);
            }
            else if (_type.IsEnum && false == _type.IsArray)
            {
                result = new DBPropertyConvertInfo(_type, null, new DBDataEnum(_type), ObjectTo);
                Infos.Add(result);
                return(result);
            }

            return(null);
        }