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

RegisterResolveInterceptor isn't hit for collections #742

Open
dotnetjunkie opened this issue Aug 30, 2019 · 0 comments
Open

RegisterResolveInterceptor isn't hit for collections #742

dotnetjunkie opened this issue Aug 30, 2019 · 0 comments

Comments

@dotnetjunkie
Copy link
Collaborator

@dotnetjunkie dotnetjunkie commented Aug 30, 2019

Describe the bug

The following code doesn't print the name of the type to the console.

var container = new Container();
            
container.Options.RegisterResolveInterceptor((c, p) =>
{
    System.Console.WriteLine(c.Registration.ImplementationType.ToFriendlyName());
    return p();
},
c => true);

container.Collection.Append<ITimeProvider, RealTimeProvider>();
            
container.GetInstance<IEnumerable<ITimeProvider>>();

Expected behavior

The name of the type should be written to the console.

Actual behavior

The following code doesn't print the name of the type to the console.

Additional context
Latest release v4.6.2.

@dotnetjunkie dotnetjunkie added this to the Backlog milestone Sep 20, 2019
@dotnetjunkie dotnetjunkie modified the milestones: Backlog, v5.0 Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.