Migrate to .NET 9 with Microsoft.Extensions.DependencyInjection#43
Open
erichexter wants to merge 4 commits into
Open
Migrate to .NET 9 with Microsoft.Extensions.DependencyInjection#43erichexter wants to merge 4 commits into
erichexter wants to merge 4 commits into
Conversation
Breaking changes: - Drop all legacy IoC container integrations (Autofac, Ninject, SimpleInjector, StructureMap, Unity, Windsor) — all are unmaintained or superseded - Add ShortBus.Extensions.DependencyInjection for Microsoft.Extensions.DI (the standard .NET DI since .NET Core 1.0) What's new: - SDK-style projects, netstandard2.0 + net9.0 targets - services.AddShortBus() registers IMediator - services.AddShortBusHandlers(assemblies) scans and registers all handler types - ServiceProviderDependencyResolver wraps IServiceProvider as IDependencyResolver - Directory.Build.props for shared version metadata (v2.0.0) - GitHub Actions CI with NuGet publish on v* tags - Updated README with MEDI setup examples Co-Authored-By: Eric Hexter <eric.hexter@gmail.com>
- Add MediatorTests.cs: 30 tests covering sync/async request-response, exception capture, no-handler behavior, fan-out notifications, partial failures with AggregateException, DI registration, and DependencyResolver - Fix TargetInvocationException wrapping in Mediator reflection calls; now unwraps using ExceptionDispatchInfo to preserve original exception type - Fix nullable reference warnings across Mediator, Response, DependencyResolver - Add coverlet.collector to test project for code coverage collection - Exclude coverage output dirs from .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ShortBus.Extensions.DependencyInjection— a new integration package forMicrosoft.Extensions.DependencyInjection, the standard DI container since .NET Core 1.0.csproj, targetingnetstandard2.0+net9.0v*tagsNew setup (3 lines)
Breaking changes
ShortBus.Extensions.DependencyInjectionor implementIDependencyResolverdirectlyPingand calling withPingALing : Ping) was previously supported implicitly by StructureMap's variance handling but is not supported by MEDI's exact-type matchingTests
8 tests passing covering: request/response, async request/response, multi-interface handlers, notifications, and container resolution.
🤖 Generated with Claude Code