public void Complete() {
if (this.isComplete) {
throw new InvalidOperationException("Transaction is already complete");
}
if (this.isRejected && !this.configuration.CompleteFailsSilentlyIfRejected) {
throw new InvalidOperationException("This transaction has been rejected");
}
if (this.transaction != null && this.shouldCommitAndDisposeTransaction && !this.isRejected) {
this.transaction.Commit();
}
if (!this.isRejected) {
this.isComplete = true;
}
}