I have a simple alert system that grabs number on the web, mix them with pre-defined text template to get an alert, and send it to clients. The alert is quite simple plain text, so I would not expect much other than plain text, numbers, simple functions(such as ifthenelse), the quicker the better. So are there any existing open source solutions for this? Thanks!
I would use Razor Engine for this.
A templating engine built upon Microsoft's Razor parsing technology. The RazorEngine allows you to use Razor syntax to build robust templates
A simple example from its page:
string template = "Hello @Model.Name! Welcome to Razor!";
string result = Razor.Parse(template, new { Name = "World" });
and result will be Hello World! Welcome to Razor!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With