what im looking its a template engine like freemarker (with select case directive) for writing a generator in c#.
+1
A:
I'm not familiar with freemarker, but I believe NVelocity may do what you're looking for.
Dathan
2010-04-13 06:49:57
thanks Dathan, ive seen nvelocity, but it seems it has no select directive (although there is a implementacion in castle nvelocity port), i need the select directive to do this:select case field.typecase int:bla , bla
2010-04-14 19:09:14
In most cases, `switch` or `select case` structures are just a shorthand way of representing an if/then/else control structure. (Exceptions are languages where `case` blocks are expressions, and if/then/else are statements). NVelocity does not have a `case` structure, but does have an [if/then/else control structure](http://velocity.apache.org/engine/devel/user-guide.html#Conditionals).
Dathan
2010-04-15 15:33:01
youre right dathan, but i think its a more elegant way to do, its like using spaguetti programming or not...i was wrong with castle nvelocity, they dont use select case either, http://www.castleproject.org/others/nvelocity/improvements.html
2010-04-16 09:21:16
If it doesn't do what you want, you shouldn't accept my answer unless it turns out there isn't a better option for what you want to do. That having been said, if you're willing to consider commercial offerings, there's [CodeSmith](http://www.codesmithtools.com/).
Dathan
2010-04-16 15:09:18
+1
A:
NVelocity is a template engine I've used to generate emails. Here's how your code might look.
Darin Dimitrov
2010-04-13 06:50:23