Closed GoogleCodeExporter closed 8 years ago
Here's the xunit test case code. It wasn't clear that I had to attach it
before submitting the issue.
Original comment by john.c...@gmail.com
on 9 Jan 2014 at 1:02
Attachments:
Original comment by travis.illig
on 10 Jan 2014 at 1:11
The services registered with Named are added as KeyedService, but those
registered with the RegisterAdapter function are added as TypedService.
Because a KeyedService requires a key, and the adapter function can't provide
the key for all the different registrations, there is no way to have it create
the required KeyedService as registration time.
I had a look at this tonight and couldn't find an easy way to solve the issue.
I'll leave this open for now and take another look when I'm a bit less tired.
Original comment by alex.meyergleaves
on 10 Jan 2014 at 1:37
Would it be possible to create a function similar to .RegisterAdapter() that
takes a KeyedService and returns a new KeyedService based on all registered
KeyedServices for the input type using an IRegistrationSource? Eg
RegisterKeyedServiceAdapter<TIn, TOut>()? I looked into trying this (mainly
reading the code for RegisterAdapter() and friends, and reading about
IRegistrationSource), and it seemed possible, but more work/maintenance than I
was able to afford at the time. And I'm relatively new to autofac, so my
judgement on such things isn't well informed.
Or alternatively, would it be possible to add an extension method the
RegisterAdapter()'s return type, ala:
builder.RegisterAdapter<TIn, TOut>(adapter func ...).AdaptKeys(key1, key2, key3)
and/or:
builder.RegisterAdapter<TIn, TOut>(adapter func ...).AdaptAllKeys()
Original comment by john.c...@gmail.com
on 13 Jan 2014 at 12:46
Moved issue to GitHub: https://github.com/autofac/Autofac/issues/482
Subsequent issue management will be held there; closing the issue on Google
Code as "WontFix" because we will handle issue resolution on GitHub.
Original comment by travis.illig
on 11 Feb 2014 at 12:01
Original comment by travis.illig
on 11 Feb 2014 at 12:01
Original issue reported on code.google.com by
john.c...@gmail.com
on 9 Jan 2014 at 12:58