c# - Trouble using TemplateGroupDirectory -
i want put several template files on directory named "templates", relative executable of application, , use them. 1 template file, instance, named "globals.st".
that way, created templategroupdirectory , loaded template:
var group = new templategroupdirectory("templates"); var tmpl = group.getinstanceof("globals");
on trying instance of template i've got message saying occurs nullreferenceexception.
what missing?
might syntax thing
heres example:
string fullpath = path.getfullpath("templates/"); templategroupdirectory tgd = new templategroupdirectory(fullpath ,'<','>'); template t = tgd.getinstanceof("helloworld"); t.add("world", "shitty world");
i have folder named templates, file helloworld.st contains
helloworld(world) ::= << hello, <world> >>
my best guess cannot find .st file need, remember put copy on newer or coby, on .st files' properties, when use relative paths, or else template nothing.
Comments
Post a Comment