Commit 7b316c2a authored by simon.cropp's avatar simon.cropp

remove more unused code

parent 71127e70
...@@ -174,7 +174,7 @@ public static GridReader QueryMultiple(this IDbConnection cnn, string sql, dynam ...@@ -174,7 +174,7 @@ public static GridReader QueryMultiple(this IDbConnection cnn, string sql, dynam
{ {
cmd = SetupCommand(cnn, transaction, sql, info.ParamReader, param, commandTimeout); cmd = SetupCommand(cnn, transaction, sql, info.ParamReader, param, commandTimeout);
reader = cmd.ExecuteReader(); reader = cmd.ExecuteReader();
return new GridReader(cmd, reader, cnn, sql); return new GridReader(cmd, reader);
} }
catch catch
{ {
...@@ -805,14 +805,10 @@ private static void EmitInt32(ILGenerator il, int value) ...@@ -805,14 +805,10 @@ private static void EmitInt32(ILGenerator il, int value)
public class GridReader : IDisposable public class GridReader : IDisposable
{ {
private IDataReader reader; private IDataReader reader;
private IDbConnection connection;
private IDbCommand command; private IDbCommand command;
private readonly string sql; internal GridReader(IDbCommand command, IDataReader reader)
internal GridReader(IDbCommand command, IDataReader reader, IDbConnection connection, string sql)
{ {
this.sql = sql;
this.command = command; this.command = command;
this.connection = connection;
this.reader = reader; this.reader = reader;
} }
/// <summary> /// <summary>
...@@ -863,7 +859,6 @@ private void NextResult() ...@@ -863,7 +859,6 @@ private void NextResult()
} }
public void Dispose() public void Dispose()
{ {
connection = null;
if (reader != null) if (reader != null)
{ {
reader.Dispose(); reader.Dispose();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment