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
ArgumentNullExceptioninstead ofNullReferenceExceptionforAgainstNullandAgainstNullOrEmptyString.
Shuttle.Core.Data
- Removed
ScriptProvideras query factories should rather be used.
Shuttle.Core.Mediator
- Renamed
IAsyncParticipanttoIParticipant.
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.GetTypesAssignableToAsynctoIReflectionService.GetTypesCastableToAsync.
Shuttle.Esb
Note: Using
JsonSerializeras the default. To use XML callservices.AddSingleton<ISerializer, XmlSerializer>()before callingservices.AddServiceBus().
- Renamed
IAsyncMessageHandlertoIMessageHandler. ServiceBusOptions.Asynchronousasasyncis now the preferred mechanism.- Removed all idempotence features, such as
IIdempotenceServiceandIdempotenceOptions, as idempotence should be a module. MessageHandlerInvokeResultremoved in favour of returningboolfromIMessageHandlerInvoker.InvokeAsync.IReusabilityremoved as handlers are obtained from theIServiceProvider.IMessageHandlingAssessorremoved.
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
IAsyncEventHandlertoIEventHandler. - Removed
EventStore.CreateEventStream. UsingEventStore.GetAsyncwill return an empty event stream if none exists. - Renamed
EventStream.AddEventtoEventStream.Add. - Removed snapshots as such funcationality should be modelled explicity, for instance using the Closing the Books pattern.