I wanted to use the excellent DotLiquid and tried to give the following example (written by me) without any major success.
internal class AuthorDrop : Drop {
private String lname;
public String ToGive { get { return lname; } }
public AuthorDrop(String t) {
lname = t;
}
}
with appropriate test
[Test]
public void TestFirstStep() {
Template tpl = Template.Parse("hi {{ author2.togive }}");
Console.WriteLine(tpl.Render(Hash.FromAnonymousObject(new { author2 = new AuthorDrop("Test 123") })));
}
However, this leads to the conclusion
hi
instead of hi Test 123.
Can someone help me figure out what's going on here?
Thank you so much in advance
- Chris
source
share