public T[] ExecuteAndRead <T>(IRowCreator <T> creator, string sql, params SqlParameter[] parameters) { var rows = new List <T>(); using (var cmd = PrepareCommand(sql, parameters)) { using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { var row = creator.CreateInstance(reader); rows.Add(row); } } } return(rows.ToArray()); }
private void CreateInstances() { _primeGenerator = new PrimeGenerator(); _rowCreator = new RowCreator(_primeGenerator); _gridCreator = new GridCreator(_rowCreator); }
// =============================================================================== // Constructor // =========== public InternalBeanArrayMetaDataResultSetHandler(IBeanMetaData beanMetaData, IRowCreator rowCreator, IRelationRowCreator relationRowCreator) : base(beanMetaData, rowCreator, relationRowCreator) { }
//creates a data row object from a csv file input public CsvToDataFile(IRowCreator rowCreator) { _rowCreator = rowCreator; }
public void TestCaseSetup() { _primeGenerator = new PrimeGenerator(); _rowCreator = new RowCreator(_primeGenerator); }
public void TestInitialise() { _primeGenerator = new PrimeGenerator(); _rowCreator = new RowCreator(_primeGenerator); }
public GridCreator(IRowCreator rowCreator) { _rowCreator = rowCreator; }
protected IRelationRowCreator _relationRowCreator; // [DAONET-56] (2007/08/29) // =============================================================================== // Constructor // =========== public InternalAbstractBeanMetaDataResultSetHandler(IBeanMetaData beanMetaData, IRowCreator rowCreator, IRelationRowCreator relationRowCreator) { _beanMetaData = beanMetaData; _rowCreator = rowCreator; _relationRowCreator = relationRowCreator; }