Good day, I'm trying to use dependency injection to add a generic service that has constructor parameters. I Need to implement this, generically: ...
Good day, I'm trying to use dependency injection to add a generic service that has constructor parameters. I Need to implement this, generically: ...
I have an interface for Audit Logging: now in main AppDbContext interface, I am inheriting this as: and in main AppDbContext class, I am inherit ...
I have the following two POCOs: private class Person { public string Name { get; set; } public int Age { get; set; } } private class PersonD ...
Please consider the following pseudo-code trying to define a higher-order type function with a function-typed parameter M<?>: type HigherOrderT ...
The AutoMapper version # is 7.0.0. Take the following set of classes: Person has a property BarList of type List<BarBase>. BarBase is an abs ...
I need to automatically register my open generic interface to its implementation classes My interface is something like that IIntegrationEventHandler ...
I have Simple Injector registration of my: I need to register same LogManager in different project using Castle Windsor. I have tried Cannot ma ...
I am trying to setup a map to utilize open generics, but it never works at runtime. I'm using AutoMapper 5.2 in .NET Core. I have these models: publ ...
Problem I have a number of concrete, generic classes with two type arguments that implement a generic interface with one type argument. For example: ...
I've recently upgraded from Automapper 4.2.1 to 5.1.1 and am having issues with a previously valid mapping involving open generics. Previously, withi ...
Lets assume these classes/interfaces: I want to register all implementations of ICommandHandler<> automatically. All variants (Register*) are ...
I have a class MyGeneric<T>, and some cached data created from type MyGeneric<string>, MyGeneric<int>, MyGeneric<double>... et ...
I would like to resolve an open generic service due to a generic interface. I use autofac. Each concrete service works only with concrete classes. ...
I am trying to use structuremap with open generic to get instances of a Event handler at run time ,I am using open generic based configuration My ...
I'm trying to use Automapper's Open Generics as described in https://github.com/AutoMapper/AutoMapper/wiki/Open-Generics to perform a mapping between ...
I have the following: I want conditional registration in Castle Windsor DI for IRepository<T>, if T is ISuperType, then provide ISuperReposit ...
Today my brain went dead, and I couldn't figure out a clean way of forcing the compiler to use inheritance for Generic inference. Imagine the followi ...
I have these open-generics: and this single decorator: What I want is to register decorator only for queries which are implementing ICacheableQu ...
Given the following open generic deocrator chain using SimpleInjector: With SimpleInjector 2.4.0, I was able to unit test this to assert the decora ...
The code below does not work when RegistrationBuilder is used. When the RegistrationBuilder is not added to the AssemblyCatalog constructor, type cons ...