Migrate Castle Windsor DI wiring to Microsoft.Extensions.DependencyInjection#24
Draft
Copilot wants to merge 4 commits into
Draft
Migrate Castle Windsor DI wiring to Microsoft.Extensions.DependencyInjection#24Copilot wants to merge 4 commits into
Copilot wants to merge 4 commits into
Conversation
…rosoft DI Co-authored-by: DavidFidge <2329907+DavidFidge@users.noreply.github.com>
Co-authored-by: DavidFidge <2329907+DavidFidge@users.noreply.github.com>
Co-authored-by: DavidFidge <2329907+DavidFidge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Change Castle Windsor dependency injection to MS dependency injection
Migrate Castle Windsor DI wiring to Microsoft.Extensions.DependencyInjection
Mar 9, 2026
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.
This PR replaces Castle Windsor-based dependency injection in core/view composition code with Microsoft DI, while preserving existing registration intent and mediator behavior. It also removes Castle-specific reflection helpers used for attribute discovery.
DI container migration (Core + View)
IServiceCollectioninstead of Windsor container APIs.AddTransient/AddSingleton/TryAddTransient.Microsoft.Extensions.DependencyInjection.Mediator composition update
IKernelproperty injection and Windsor resolve/release usage.ServiceFactoryviaIServiceProviderand updatedMediatorto use constructor injection.Convention registration contributors
IContributeComponentModelConstructioncontributors with assembly-scanning registration helpers for:IRequestHandler<T>INotificationHandler<T>IScreenimplementationsReflectionTypeLoadException).Castle reflection helper removal
GetAttributes<T>()(Castle.Core.Internal) with standard reflectionGetCustomAttributes<T>()in action-map and console-command attribute discovery paths.ConsoleCommandServiceFactoryto consumeIEnumerable<IConsoleCommand>for MS DI compatibility.Focused unit coverage
Senddispatches to request handlerPublishdispatches to all notification handlersOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.