Skip to content

PolarbearDK/Miracle.Macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cb8ddd4 · Oct 30, 2018

History

11 Commits
Oct 30, 2018
Oct 30, 2018
May 25, 2018
Jul 23, 2014
Aug 14, 2014
May 25, 2018

Repository files navigation

Miracle.Macros

Expand macros in strings.

Sample usage:

var macroString = "Hello ${Location}";
Console.WriteLine(macroString.ExpandMacros(new { Location = "World"});

Macros has the form:

${Property}

Nested properties are supported:

${Property.SubProperty}
${Property.SubProperty.SubProperty2}
ect.

Composite formatting can be applied using:

${Property:format}
${Property.SubProperty:format}