You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll add this failing test as skipped to the repo so we can troubleshoot.
Expected Behavior
You should be able to apply keys and filters to the component exposed as itself, not just as a different service.
Exception with Stack Trace
Autofac.Core.DependencyResolutionException : An exception was thrown while activating Autofac.Test.Features.AttributeFilters.WithAttributeFilterTestFixture+ManagerWithManyIndividualConcrete.
---- Autofac.Core.DependencyResolutionException : None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Autofac.Test.Features.AttributeFilters.WithAttributeFilterTestFixture+ManagerWithManyIndividualConcrete' can be invoked with the available services and parameters:
Cannot resolve parameter 'IdentifiableObject first' of constructor 'Void .ctor(ILogger, IdentifiableObject, IdentifiableObject, IdentifiableObject)'.
Describe the Bug
All of our examples and tests for key filtering use service interfaces, like:
However, it turns out if you try using the concrete type as the keyed service, it fails when used with attribute filtering.
Steps to Reproduce
In this unit test, you'll get a
DependencyResolutionException
where it fails to resolve theIdentifiableObject first
parameter by key filter.I'll add this failing test as skipped to the repo so we can troubleshoot.
Expected Behavior
You should be able to apply keys and filters to the component exposed as itself, not just as a different service.
Exception with Stack Trace
Dependency Versions
Autofac:
develop
at 9a2d3a4The text was updated successfully, but these errors were encountered: