DpdtInject icon indicating copy to clipboard operation
DpdtInject copied to clipboard

check for constructor arguments setting is working in conventional binding clause

Open lsoft opened this issue 3 years ago • 0 comments

like https://github.com/lsoft/DpdtInject#constructor-choosing

//the following statement will bind A0 and A2; A1 will be excluded due to IExclude<>
ScanInAssembliesWith<A0>()
    .SelectAllWithOpenGeneric<IA<object, object>>() //generic arguments 'object' means NOTHING! it will be removed by Dpdt, so IA<object, object> will be transformed into IA<,> (open generic)
    .ExcludeAllWithOpenGeneric<IExclude<object, object>>() //again, 'object' means nothing, as above
    .FromAllInterfaces()
    .ToItself()
    .WithSingletonScope()
    .Setup<SubsetNoOrderConstructorSetting<int, long>>() // <------------------------
    ; 

CHECK IF IT WORKS ALREADY AND WRITE A TEST IF SO!

lsoft avatar Apr 16 '22 17:04 lsoft