public void Dispose() {
if (this.isDisposed) {
return;
}
if (this.transaction != null && this.shouldCommitAndDisposeTransaction) {
if (!this.isComplete) {
this.transaction.Rollback();
}
this.transaction.Dispose();
}
if (this.shouldDisposeConnection) {
this.connection.Dispose();
}
this.isDisposed = true;
}
}