protected override T CreateObject <T>(Table table, Row row) { DynaType dynaType = typeConverter.GetDynaType(table); DynaRow <T> bean = dynaType.NewInstance <T>(); SetProperties(table, row, table.Columns, bean); return(bean.Instance); }
private void SetProperty <T>(Table table, Row row, Column column, DynaRow <T> bean) { string name = column.Name; string textValue = GetValue(row, name); DynaColumn property = bean.DynaType[column.Name]; object value = ToObject(name, property.Type, property.ComponentType, textValue, table, row); ((IDictionary)bean.Instance)[name] = value; }
private void SetProperties <T>(Table table, Row row, List <Column> columns, DynaRow <T> bean) { foreach (Column column in columns) { if (column != null) { SetProperty(table, row, column, bean); } } }