Shuttle.Core.Transactions 11.0.0

.NET Standard 2.0
dotnet add package Shuttle.Core.Transactions --version 11.0.0
NuGet\Install-Package Shuttle.Core.Transactions -Version 11.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shuttle.Core.Transactions" Version="11.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shuttle.Core.Transactions --version 11.0.0
#r "nuget: Shuttle.Core.Transactions, 11.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Shuttle.Core.Transactions as a Cake Addin
#addin nuget:?package=Shuttle.Core.Transactions&version=11.0.0

// Install Shuttle.Core.Transactions as a Cake Tool
#tool nuget:?package=Shuttle.Core.Transactions&version=11.0.0

Shuttle.Core.Transactions

PM> Install-Package Shuttle.Core.Transactions

This package makes use of the .Net TransactionScope class to provide ambient transaction handling.

Configuration

The relevant components may be configured using IServiceColletion:

services.AddTransactionScope(builder => 
{
    builder.Options.Enabled = true;
    builder.Options.IsolationLevel = isolationLevel;
    builder.Options.Timeout = TimeSpan.FromSeconds(30);
});

The default JSON settings structure is as follows::

{
	"Shuttle": {
		"TransactionScope": {
			"Enabled": true,
			"IsolationLevel": "isolation-level",
			"Timeout": "00:00:30"
		} 
	}
}

ITransactionScope

An implementation of the ITransactionScope interface is used to wrap a TransactionScope.

The DefaultTransactionScope makes use of the standard .NET TransactionScope functionality. There is also a NullTransactionScope that implements the null pattern so it implements the interface but does not do anything.

Properties

Guid Id { get; }

Returns the Id of the transaction scope.

Methods

void Complete();

Marks the transaction scope as complete.

ITransactionScopeFactory

An implementation of the ITransactionScopeFactory interface provides instances of an ITransactionScope implementation.

The TransactionScopeFactory provides a DefaultTransactionScope instance if transaction scopes are Enabled; else a NullTransactionScope that implements the null pattern.

Create

ITransactionScope Create(IsolationLevel isolationLevel, TimeSpan timeout);

Creates the relevant instance using the given parameters.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Shuttle.Core.Transactions:

Package Downloads
Shuttle.Esb The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Contains the core Shuttle.Esb assembly that should always be referenced when building Shuttle.Esb solutions.

Shuttle.Core.PipelineTransaction The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Provides a pipeline observer to handle transaction scopes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
11.0.0 5,923 9/4/2022
10.0.3 16,476 11/27/2020
10.0.2 28,178 10/15/2018
10.0.1 42,319 7/4/2018
10.0.0 8,567 1/3/2018