castle windsor - Potentially Misconfigured Components using TypedFactory -


i'm learning how use windsor typedfactory: feature it's awesome! made work need, have concern having 1 potentially misconfigured components "castle.typedfactory.delegateproxyfactory" iproxyfactoryextension / delegateproxyfactory...

that's container , working... still concern waring built container

container = new windsorcontainer();  container.kernel.resolver.addsubresolver(new arrayresolver(container.kernel));  container.addfacility<typedfactoryfacility>(); container.register(component.for<itypedfactorycomponentselector>().implementedby<customtypedfactorycomponentselector>());  container.register (      component.for<contracts.iconverter>().implementedby<components.converter1>().named("converter1").lifestyle.singleton,       component.for<contracts.iconverter>().implementedby<components.converter2>().named("converter2").lifestyle.singleton,     component.for<contracts.iconverterfactory>().asfactory(c => c.selectedwith(new customtypedfactorycomponentselector())),      component.for<converterhelper>().lifestyle.transient ); 

adding

container.register(component.for<itypedfactorycomponentselector>().implementedby<customtypedfactorycomponentselector>()); 

i solved additional "potentially misconfigured components" "castle.typedfactory.interceptor" typedfactoryinterceptor

how can fix remaining one?

crixo - there's reason why that's called potentially misconfigured component. notice emphasis.

the reason being, in case ''missing'' dependency here provided dynamically delegateproxyfactory , windsor can not verify statically.

so means if use component directly might end not being able resolve unless you'd provide missing dependency on fly. facility makes sure that, component resolved if used through facility.

in other words - can safely ignore warning.

ps,

since you're providing customtypedfactorycomponentselector inline don't need register it. future version of windsor able figure out dependencies , provide them you. right now, rest assured work.

in other words - can safely ignore warning.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -