private double[] Time(string expression, ParseRow method) { double[] numArray = new double[3]; int num = 0; using (SqlConnection connection = new SqlConnection(this.GetConnectionString())) { connection.Open(); string geometryColumn = this.GetGeometryColumn(connection, this.cmbTables.Text); SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandText = string.Format("SELECT [{1}]{2} FROM [{0}]", this.cmbTables.Text, geometryColumn, expression); this.perf.Start(); SqlDataReader reader = command.ExecuteReader(); this.perf.Stop(); numArray[0] = this.perf.Duration(1); this.perf.Start(); while (reader.Read()) { method(reader); num++; } this.perf.Stop(); connection.Close(); numArray[1] = this.perf.Duration(1); numArray[2] = num; } return(numArray); }
private double[] Time(string expression, ParseRow method) { double[] numArray = new double[3]; int num = 0; using (SqlConnection connection = new SqlConnection(this.GetConnectionString())) { connection.Open(); string geometryColumn = this.GetGeometryColumn(connection, this.cmbTables.Text); SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandText = string.Format("SELECT [{1}]{2} FROM [{0}]", this.cmbTables.Text, geometryColumn, expression); this.perf.Start(); SqlDataReader reader = command.ExecuteReader(); this.perf.Stop(); numArray[0] = this.perf.Duration(1); this.perf.Start(); while (reader.Read()) { method(reader); num++; } this.perf.Stop(); connection.Close(); numArray[1] = this.perf.Duration(1); numArray[2] = num; } return numArray; }
public Nonterminal() { Row = new ParseRow(); }