public SqlClientSqlCommandSet() { instance = Activator.CreateInstance(sqlCmdSetType, true); connectionSetter = (PropSetter<SqlConnection>) Delegate.CreateDelegate(typeof(PropSetter<SqlConnection>), instance, "set_Connection"); transactionSetter = (PropSetter<SqlTransaction>) Delegate.CreateDelegate(typeof(PropSetter<SqlTransaction>), instance, "set_Transaction"); commandTimeoutSetter = (PropSetter<int>) Delegate.CreateDelegate(typeof(PropSetter<int>), instance, "set_CommandTimeout"); connectionGetter = (PropGetter<SqlConnection>) Delegate.CreateDelegate(typeof(PropGetter<SqlConnection>), instance, "get_Connection"); commandGetter = (SqlClientSqlCommandSet.PropGetter<System.Data.SqlClient.SqlCommand>) Delegate.CreateDelegate(typeof(SqlClientSqlCommandSet.PropGetter<System.Data.SqlClient.SqlCommand>), instance, "get_BatchCommand"); doAppend = (AppendCommand) Delegate.CreateDelegate(typeof(AppendCommand), instance, "Append"); doExecuteNonQuery = (ExecuteNonQueryCommand) Delegate.CreateDelegate(typeof(ExecuteNonQueryCommand), instance, "ExecuteNonQuery"); doDispose = (DisposeCommand) Delegate.CreateDelegate(typeof(DisposeCommand), instance, "Dispose"); }
public SqlClientSqlCommandSet() { instance = Activator.CreateInstance(sqlCmdSetType, true); connectionSetter = (PropSetter <SqlConnection>) Delegate.CreateDelegate(typeof(PropSetter <SqlConnection>), instance, "set_Connection"); transactionSetter = (PropSetter <SqlTransaction>) Delegate.CreateDelegate(typeof(PropSetter <SqlTransaction>), instance, "set_Transaction"); commandTimeoutSetter = (PropSetter <int>) Delegate.CreateDelegate(typeof(PropSetter <int>), instance, "set_CommandTimeout"); connectionGetter = (PropGetter <SqlConnection>) Delegate.CreateDelegate(typeof(PropGetter <SqlConnection>), instance, "get_Connection"); commandGetter = (SqlClientSqlCommandSet.PropGetter <System.Data.SqlClient.SqlCommand>) Delegate.CreateDelegate(typeof(SqlClientSqlCommandSet.PropGetter <System.Data.SqlClient.SqlCommand>), instance, "get_BatchCommand"); doAppend = (AppendCommand)Delegate.CreateDelegate(typeof(AppendCommand), instance, "Append"); doExecuteNonQuery = (ExecuteNonQueryCommand) Delegate.CreateDelegate(typeof(ExecuteNonQueryCommand), instance, "ExecuteNonQuery"); doDispose = (DisposeCommand)Delegate.CreateDelegate(typeof(DisposeCommand), instance, "Dispose"); }