Shaolinq.DataAccessScope.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
		public void Dispose()
		{
			if (this.disposed)
			{
				throw new ObjectDisposedException(nameof(DataAccessScope));
			}

			this.disposed = true;
			
			if (!this.complete)
			{
				this.transaction?.Rollback();
			}

			if (this.isRoot)
			{
				this.transaction?.Dispose();
			}

			DataAccessTransaction.Current = this.outerTransaction;

			this.nativeScope?.Dispose();
		}
	}