Skip to content

sebastienferry/MacroProcessing

Repository files navigation

SfySoft.MacroProcessing

A simple macro-processing POC that relies on Expression Tress to create a list of Func<> to represent a template made of string literals and macros.

Macro are between square brackets.

CompiledTemplate compiledTemplate = MacroProcessor.Compile("Hello, my name is [foo] and I'm [bar] years old");
string result = compiledTemplate.Render(new Foo(42, "Josh"));

or simply:

stirng result = MacroProcessor.Render("Hello, my name is [foo] and I'm [bar] years old", new Foo(42, "Josh"));

About

A simple macro-processing POC.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages