private AbstractDatabaseColumn (AbstractDatabaseColumnAttribute attribute, MemberInfo member_info, Type type) { try { column_type = SqliteUtils.GetType (type); } catch (Exception e) { throw new Exception(string.Format( "{0}.{1}: {2}", member_info.DeclaringType, member_info.Name, e.Message)); } this.name = attribute.ColumnName ?? member_info.Name; this.type = type; }
protected AbstractDatabaseColumn (PropertyInfo property_info, AbstractDatabaseColumnAttribute attribute) : this (attribute, property_info, property_info.PropertyType) { if (!property_info.CanRead || (attribute.Select && !property_info.CanWrite)) { throw new Exception (String.Format ( "{0}: The property {1} must have both a get and a set " + "block in order to be bound to a database column.", property_info.DeclaringType, property_info.Name) ); } this.property_info = property_info; }
protected AbstractDatabaseColumn(PropertyInfo property_info, AbstractDatabaseColumnAttribute attribute) : this(attribute, property_info, property_info.PropertyType) { if (!property_info.CanRead || (attribute.Select && !property_info.CanWrite)) { throw new Exception(String.Format( "{0}: The property {1} must have both a get and a set " + "block in order to be bound to a database column.", property_info.DeclaringType, property_info.Name) ); } this.property_info = property_info; }
protected AbstractDatabaseColumn(FieldInfo field_info, AbstractDatabaseColumnAttribute attribute) : this(attribute, field_info, field_info.FieldType) { this.field_info = field_info; }
protected AbstractDatabaseColumn (FieldInfo field_info, AbstractDatabaseColumnAttribute attribute) : this (attribute, field_info, field_info.FieldType) { this.field_info = field_info; }