Obviously, I'd prefer you to take all my code and incorporate it, instead of maintaining my own version. But I'm doing things quite differently.
We have too many packages already and need to start offloading some if anything. Do you still require the functionality provided in your package? It is quite different and seems like you might be continually fighting battles on multiple fronts.
Any hope of supporting ByRef ctor parameters? Clarity: I mean for 'in' parameters.
Looks like there is already a related issue open for that. #1226
I have a real question. Imagine I have a set of services. They all depend on each other by resolving each other through interfaces. There's a set of HostedServices that go along with them as well.
I want to register this block of services twice. But have each block only resolve from amongst itself. So, two copies of this set of services, that only depend on other services within the same set. Named services are the idea. Except, I want to make the names of the ctor injectors dynamic to the name of the set, also.
Or, register it all twice, in two separate Lifetime Scopes. However, it's not really a lifetime scope. Because there's HostedServices, and those really need to be started by the top-level generic Host.
var registry = (HttpClientMappingRegistry)builder.Services.Single(sd => sd.ServiceType == typeof(HttpClientMappingRegistry)).ImplementationInstance; Debug.Assert(registry != null);
.WithParameter( new ResolvedParameter( (pi, ctx) => pi.ParameterType == typeof(IReadonlyRepository), (pi, ctx) => ctx.Parent.Type == typeof(SomeType) ? ctx.Resolve<NonDefaultReadonlyRepository>() : ctx.Resolve<DefaultReadonlyRepository>())