Upgrade to v20.0.0
All major components in the Shuttle space have a semver
version number starting at 20.0.0
and all synchronous methods have been removed where an asynchronous method is available. The approach is now async
first.
Also, only the lastest LTS version of dotnet
will be supported going forward.
Breaking Changes
Please note that there are quite a few breaking changes. These will, typically, require minimal rework or "search & replace" to fix but it is still going to take some work.
Shuttle.Core
Shuttle.Core.Contract
- Throwing
ArgumentNullException
instead ofNullReferenceException
forAgainstNull
andAgainstNullOrEmptyString
.
Shuttle.Core.Data
- Removed
ScriptProvider
as query factories should rather be used.
Shuttle.Core.Mediator
- Renamed
IAsyncParticipant
toIParticipant
.
Shuttle.Core.Pipelines
IPipelineObserver
: changedTask ExecuteAsync(TPipelineEvent pipelineEvent)
toTask ExecuteAsync(IPipelineContext<TPipelineEvent> pipelineContext)
.- Pipeline events no longer need to inherit from
PipelineEvent
; and it has been removed.
Shuttle.Core.Reflection
- Removed
IReflectionService.AssemblyPath
. - Removed
IReflectionService.FindAssemblyNamedAsync
. - Removed
IReflectionService.GetAssemblyAsync
. - Removed
IReflectionService.GetTypesAsync
. - Renamed
IReflectionService.GetTypesAssignableToAsync
toIReflectionService.GetTypesCastableToAsync
.
Shuttle.Esb
Note: Using
JsonSerializer
as the default. To use XML callservices.AddSingleton<ISerializer, XmlSerializer>()
before callingservices.AddServiceBus()
.
- Renamed
IAsyncMessageHandler
toIMessageHandler
. ServiceBusOptions.Asynchronous
asasync
is now the preferred mechanism.- Removed all idempotence features, such as
IIdempotenceService
andIdempotenceOptions
, as idempotence should be a module. MessageHandlerInvokeResult
removed in favour of returningbool
fromIMessageHandlerInvoker.InvokeAsync
.IReusability
removed as handlers are obtained from theIServiceProvider
.IMessageHandlingAssessor
removed.
Shuttle.Esb.Sql.Subscription
Previuosly the SQL subscription service was registered like this:
c#
services
.AddSqlSubscription()
.AddServiceBus(builder =>
{
builder.Options.Subscription.ConnectionStringName = "ProcessManagement";
});
It now needs to be registered like this:
c#
services
.AddSqlSubscription(builder =>
{
builder.Options.ConnectionStringName = "Subscription";
builder.Options.Schema = "dbo"; // Optional. Defaults to `dbo`
builder.UseSqlServer();
})
Shuttle.Recall
- Renamed
IAsyncEventHandler
toIEventHandler
. - Removed
EventStore.CreateEventStream
. UsingEventStore.GetAsync
will return an empty event stream if none exists. - Renamed
EventStream.AddEvent
toEventStream.Add
. - Removed snapshots as such funcationality should be modelled explicity, for instance using the Closing the Books pattern.