Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Castle.Windsor.Extensions.DependencyInjection to support .NET8 #668

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Commits on Feb 9, 2024

  1. Refs: castleproject#646 Castle.Windsor.Extension.DepencencyInjection …

    …removed null
    
    check on scope cache (AsyncLocal can be null on Threads coming from
    Threadpool.UnsafeQueueUserWorkItem, having no null check was also the
    original behavior)
    AGiorgetti authored and alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    08ad3dc View commit details
    Browse the repository at this point in the history
  2. ExtensionContainerRootsScopeAccessor might return a null root scope in

    Threadpool.UnsafeQueueUserWorkItem.
    AGiorgetti authored and alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    a8347ea View commit details
    Browse the repository at this point in the history
  3. Added More failing test cases

    AGiorgetti authored and alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    ba03d1b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    df9dd36 View commit details
    Browse the repository at this point in the history
  5. Improved tests and comments

    AGiorgetti authored and alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    64df1b0 View commit details
    Browse the repository at this point in the history
  6. Option to map custom NetStatic to Castle Singleton lifestyle.

    this improve resolution of singleton object that might not need a root
    scope, the windsor container should be enough to resolve singletons
    AGiorgetti authored and alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    28ac185 View commit details
    Browse the repository at this point in the history
  7. RootScope AsyncLocal cache can be null when AspNetCore tries to create

    scopes from Threadpool.UnsafeQueueUserWorkItem
    AGiorgetti authored and alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    a210c2a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b390405 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b997da0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5532539 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    518cc84 View commit details
    Browse the repository at this point in the history
  12. added gitversion

    alkampfergit committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    81c6b05 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Update to work with .NET 8 dependency registration.

    Major fix was to support keyed registration scenario
    alkampfergit committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    3707b52 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Fixed bug in missing root scope with orleans/kestrel.

    The previous handling of root scope is wrong, the code
    set root scope in an AsyncLocal variable when WindsorServiceProviderFactoryBase
    was first creatd. The problem arise with kestrel or orleans in
    .NET 8, they use a Thread Pool that runs code outside AsyncLocal
    so it will break resolution.
    It was not possible to reproduce locally, but it was reproduced
    with production code. A repro for the bug still missing.
    Also we can support using a Global root scope only if we use
    only ONE CONTAINER in the .NET core DI, because basic structure
    does not allow to find the container that is resolving scoped component
    thus we cannot determin the right root context.
    Still work to do to support multiple container.
    alkampfergit committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    1830955 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

  1. Added logic to support multiple container in .NET 8 DI

    Needed to modify basic Castle.Winsor library to support
    the ability from IHandler interface to get the current kernel
    associated with the handler. This is needed to find the correct
    root scope associated with that kernel instance.
    alkampfergit committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    7437a7c View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    36bbbf1 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Updated nuget test adapter fixed a resolution bug

    The bug happened when you register a service with one NON keyed
    component then again with KEYED components. The adapter incorrectly
    checked only the first returned service for KEYED and returns null.
    
    Identified after update to Orleans 8.1.0
    alkampfergit committed May 22, 2024
    Configuration menu
    Copy the full SHA
    17d1010 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Fixed IsDefault() usage in DependencyInjectionAdapter

    If multiple concrete classes are registered in castle, when
    you resolve castle resolves the first one. With Microsoft DI
    is the oposite, you want the last registered. The resolution
    is now fixed to honor IsDefault() because previous code registered
    every component with IsDefault() if it is registered from
    the adapter.
    alkampfergit committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    9499d3a View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Fixed (again) resolution rules during resolve.

    We added a new concept, an extendede property that
    allows the code to understand if the dependency
    was registered through the adapter (ServiceCollection)
    or directly through the Container.
    
    This allows us to change the resolution rule in case
    of multiple services registered with the same name.
    alkampfergit committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    b71829c View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. Cleanup from PR Requests

    alkampfergit committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    495fc21 View commit details
    Browse the repository at this point in the history