I think I understand the basic principals of T4 but I'm having a hard time figuring out how to apply it to my particular situation.
I have an application that display lists of objects of some kind - doesn't matter what. I want to allow the users to select 1 or more of these objects and submit them to any template. The template could generate, for example, an html file describing the objects or a powershell script to manipulate them in some way or whatever.
The thing I cant figure out is how to pass the selected objects into my custom host.
I could create an extensive tt include file that called my own api to retrieve these objects from their storage, but this seems silly when I already have instances of the objects in scope and I just want to examine them to produce some text output.
I hope this makes sense...
I have tried adding properties to my host and then using the hostspecific setting I thought I could use the objects via these properties but all I get is errors about serialization and such stuff.
A really good example of how to do this would be fantastic :)
Thanks