asp.net - Cant register vNext DI services using generics -


before moved aspnet5/vnext used simpleinjector. use simpleinjector register generic validators, using following:

services.addscoped(typeof(ivalidator<>), new list<assembly> { assembly.load("my.other.assembly") }); 

my classes defined in other assembly

public interface imyinterface : ivalidator<myobject> {}  public class myvalidator : imyinterface {    // methods here } 

is possible using standard vnext di system?

yes, possible. take here: http://dotnetliberty.com/index.php/2016/01/11/dependency-scanning-in-asp-net-5/


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -