I am working on a code generation recipe that requires some significant
data collection. As such I've created a custom wizard page.
The custom wizard populates an object hierarchy that I'd like to make
available to my T4 template. I am making the following calls (as
shown in the Custom Wizard Page instructions) when my data has been
captured into my custom business object:
IDictionaryService dictionaryService =
GetService(typeof(IDictionaryService)) as IDictionaryService;
dictionaryService.SetValue("DAFMapper", dafMapper);
DAFMapper is my custom business object. Though the SetValue call
appears to be capable of taking an object in it's value param, it dies
wanting to convert my object to a string. I'm wondering if anyone
else has attempted to push object data (rather than strings) into the
stack for use by templates.
--Chris
Chris Mazur
Chris Mazur
Turns out I answered my own question and figured I'd post in case
someone else runs into this. I had not specified a Type attribute
for my DAFMapper argument in my Guidance.xml file. It appears
that the default type for an argument is string if none is explicit
specified