示例#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);
        }
示例#2
0
 public DBValueDynamic(DBPropertyConvertInfo _valueType, string _fieldName, bool _isUseStringToken, object _defaultValue)
 {
     ValueType        = _valueType;
     FieldName        = _fieldName;
     IsUseStringToken = _isUseStringToken;
     DefaultValue     = _defaultValue;
 }
        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);
        }
示例#4
0
 public ValueField(DBPropertyConvertInfo _convertInfo, FieldInfo _info)
     : base(_convertInfo)
 {
     Info = _info;
 }
示例#5
0
 public DBProperty(DBPropertyConvertInfo _convertInfo)
 {
     ConvertInfo = _convertInfo;
 }
示例#6
0
 public ValueProperty(DBPropertyConvertInfo _convertInfo, PropertyInfo _info)
     : base(_convertInfo)
 {
     Info = _info;
 }
示例#7
0
 public DBPropertyStorage(string _fieldName, int _fieldIndex, DBPropertyConvertInfo _convertInfo)
 {
     FieldName   = _fieldName;
     FieldIndex  = _fieldIndex;
     ConvertInfo = _convertInfo;
 }