inversion of control - Resolve dependencies with Castle Windsor using MEF in Visual Studio 2010 addin -


i wondering if there best practices using castle windsor visual studio 2010 addin, uses mef internally instantiate controls, such iwpftextview.

all dependencies registered when vspackage created. how can later resolve dependencies when iwpftextviewcreationlistener created via mef, sometime later? should expose container singleton , access it, or there better way?

edit here's i'm trying accomplish. when vspackage created, windsor wiring dependencies, is, of course, great.

my addin "editor adornment" type of extensibility, after solution loaded , code file opened, callback class inherits iwpftextviewcreationlistener (and exported [export(typeof(iwpftextviewcreationlistener))] via mef (which done automatically visual studio).

this happens in context, is, don't have access vspackage class, , dependencies need not initialized. @ point i'm not sure how can dependencies wired windsor.

hope makes clearer.

(you can try creating own extensibilty project using file | new project | visual c# | extensibility | text editor adornment, example, see how (and when) textadornment1factory created.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -