So, somewhere I have this (I'm sorry it copied so ugly, not sure the trick there)
Public Class TemplateWrapperT4
Somewhere else in a helper method I have the code:
Dim exports = mContainer.GetExports(Of ITemplateWrapper, ITemplateWrapperCompositionRules)()
' Do stuff to select templateWrapperExport
Dim templateWrapper = templateWrapperExport.GetExportedObject()
I was under the impression from reading the docs that if I put "ImportingConstructor" on the constructor, it would look for any service supplying a string? Is it smarter than that? I want to take what feels a simpler approach of just passing parameters
to the GetExportedObject method. In my fantasies, I'd like it to have a "sort-of shared" mode where it was shared if a hash of the constructor values matched and new if the parameters were new.
And the other problem is that this approach sets up a cursor like approach that supplies this name, and then changes the name to the next template. Assuming this is in a multi-threaded environment which I ceratinly hope to achieve. That approach seems really
risky and I don't see it working in a multi-threaded environment (which I'm just trying to figure out anyway).