unity container - UnityContainer usage and best practices -
is wrong use unitycontainer in app access references objects different parts of application (but same assembly)?
the application (wpf) has several regions need access each other , have used unitycontainer that. example, "main" region (which drawing area) has presenter behind it, manages it's business logic, , have registered instance of presenter in container, , in other parts of application need access control region, access via unitycontainer.
not sure if that's practice or bad one.
no, in fact, that's kind of purpose it. there library out there called servicelocator works allows switch out ioc containers, provides way lookup container, etc. find overkill in i've never had swap out containers... using static "factory" container enough. usually, top level class has call , responsible assembling dependencies.
Comments
Post a Comment