Shuttle.Core.Transactions
11.0.1
dotnet add package Shuttle.Core.Transactions --version 11.0.1
NuGet\Install-Package Shuttle.Core.Transactions -Version 11.0.1
<PackageReference Include="Shuttle.Core.Transactions" Version="11.0.1" />
paket add Shuttle.Core.Transactions --version 11.0.1
#r "nuget: Shuttle.Core.Transactions, 11.0.1"
// Install Shuttle.Core.Transactions as a Cake Addin
#addin nuget:?package=Shuttle.Core.Transactions&version=11.0.1
// Install Shuttle.Core.Transactions as a Cake Tool
#tool nuget:?package=Shuttle.Core.Transactions&version=11.0.1
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 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.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 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 7.0.0)
- Shuttle.Core.Contract (>= 11.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Shuttle.Core.Transactions:
Package | Downloads |
---|---|
Shuttle.Esb
Contains the core Shuttle.Esb assembly that should always be referenced when building Shuttle.Esb solutions. |
|
Shuttle.Core.PipelineTransaction
Provides a pipeline observer to handle transaction scopes. |
GitHub repositories
This package is not used by any popular GitHub repositories.