Exemplo n.º 1
0
 public GetPropertyHandler(PropertyInfo property)
 {
     if (property.CanRead)
     {
         Get = ReflectionHandlerFactory.PropertyGetHandler(property);
     }
 }
Exemplo n.º 2
0
 public GetPropertyHandler(PropertyInfo property)
 {
     if (property.CanRead)
     {
         this.mGetValue = ReflectionHandlerFactory.PropertyGetHandler(property);
     }
     this.mProperty = property;
     this.mName     = property.Name;
 }
Exemplo n.º 3
0
 public PropertyHandler(PropertyInfo property)
 {
     if (property.CanWrite)
     {
         Set = ReflectionHandlerFactory.PropertySetHandler(property);
     }
     if (property.CanRead)
     {
         Get = ReflectionHandlerFactory.PropertyGetHandler(property);
     }
     Property      = property;
     IndexProperty = Property.GetMethod.GetParameters().Length > 0;
 }
Exemplo n.º 4
0
 public PropertyHandler(PropertyInfo property)
 {
     if (property.CanWrite)
     {
         this.mSetValue = ReflectionHandlerFactory.PropertySetHandler(property);
     }
     if (property.CanRead)
     {
         this.mGetValue = ReflectionHandlerFactory.PropertyGetHandler(property);
     }
     this.mProperty     = property;
     this.IndexProperty = this.mProperty.GetMethod.GetParameters().Length > 0;
 }
Exemplo n.º 5
0
        public DataParameterMapping(PropertyInfo property, string name, ParameterDirection direction)
        {
            if (property.CanRead)
            {
                this.mGetValue = ReflectionHandlerFactory.PropertyGetHandler(property);
            }
            if (property.CanWrite)
            {
                this.mSetValue = ReflectionHandlerFactory.PropertySetHandler(property);
            }
            this.mType = property.PropertyType;
            TypeCode code = Type.GetTypeCode(this.mType);

            this.mConvertString = code == TypeCode.Object || code == TypeCode.DBNull || code == TypeCode.Empty;
            if ((this.mDirection == ParameterDirection.InputOutput || this.mDirection == ParameterDirection.Output) && mConvertString)
            {
                throw new LightDataException(SR.OutputParameterNotSupportObjectType);
            }
            this.mProperty  = property;
            this.mName      = string.IsNullOrEmpty(name) ? property.Name : name;
            this.mDirection = direction;
        }
Exemplo n.º 6
0
        public DataParameterMapping(PropertyInfo property, string name, ParameterDirection direction)
        {
            if (property.CanRead)
            {
                Get = ReflectionHandlerFactory.PropertyGetHandler(property);
            }
            if (property.CanWrite)
            {
                Set = ReflectionHandlerFactory.PropertySetHandler(property);
            }
            ParameterType = property.PropertyType;
            var code = Type.GetTypeCode(ParameterType);

            ConvertString = code == TypeCode.Object || code == TypeCode.DBNull || code == TypeCode.Empty;
            if ((Direction == ParameterDirection.InputOutput || Direction == ParameterDirection.Output) && ConvertString)
            {
                throw new LightDataException(SR.OutputParameterNotSupportObjectType);
            }
            Property  = property;
            Name      = string.IsNullOrEmpty(name) ? property.Name : name;
            Direction = direction;
        }