Kristian Hellang

Results 237 comments of Kristian Hellang

I think it makes sense to exclude `IEnumerable` (as that has built-in semantics in the container), but other than that, I think you'll have to pass your own "rules" in...

> I do not actually need to register IRegisteredObject but it also seems like there is no way to tell Scrutor to ignore this interface. @THammond9 There is. It's mentioned...

I've added an overload to `AsImplementedInterfaces` that lets you filter the interfaces you'd like to register using a predicate and pushed it to NuGet as part of v4.1.0 πŸ˜„ I'll...

Thanks for this @david-driscoll! I need to take some time to look at this and I'll get back to you πŸ˜„

> there's a lot of bugs in there @jposert That's a pretty pathetic bug report. Any more details would be welcome. Preferably in a separate issue. Scrutor has 19,021,071 downloads...

As mentioned in #175, I think I'd prefer to keep the decorator around and just try to patch the few places that fail. It's their fault for operating under false...

Hey! πŸ‘‹ You should be able to register using this pattern: https://github.com/khellang/Scrutor/blob/9f095b0557ab69f31292344f97d16facd343ee4d/test/Scrutor.Tests/ScanningTests.cs#L194-L197

Just look at the registrations in the `services` collection. It should be registered as `IRequestHandler`, so you need to resolve `IRequestHandler`.

If you want it registered as itself, you can use `services.AddScoped(typeof(GetOneByIdHandler));`

Ah, I think I know what's happening now. Because `GetOneByIdHandler` and `IRequestHandler` have different generic arity, the type is filtered out when trying to register using `.AsImplementedInterfaces()`. You either have...