public static void Main()
dynamic data = new ExpandoObject();
data.Location = new ExpandoObject();
data.Location.State = "Colorado";
data.Search = new ExpandoObject();
data.Search.SaleSearch = true;
data.Search.SaleLeaseSearch = false;
data.Search.LeaseSearch = false;
data.Search.Auction = false;
data.Search.Distressed = false;
data.Search.SearchResultsPageNumber = new ExpandoObject();
data.Search.SearchResultsPageNumber.Value = 1;
data.Search.SearchResultsPageNumber.Plural = false;
data.SeoPropertyType = new ExpandoObject();
data.SeoPropertyType.SeoPropType = "Retail Office";
data.SeoPropertyType.SeoPropTypePlural = "Retail Office";
data.SeoPropertyType.SeoSpaceUsePlural = "";
{{#if Search.SaleSearch}}
{{#if SeoPropertyType.SeoPropType}}
{{#if Search.Auction}}{{SeoPropertyType.SeoPropType}} Auctions
{{#if Search.Distressed}}Distressed
{{SeoPropertyType.SeoPropTypePlural}} for Sale
{{#if Search.Auction}}Commercial Real Estate Auctions
{{#if Search.Distressed}}Distressed
Commercial Real Estate for Sale
{{#if SeoPropertyType.SeoSpaceUsePlural}}
{{SeoPropertyType.SeoSpaceUsePlural}}
{{#if Search.SearchResultsPageNumber.Plural}} page {{Search.SearchResultsPageNumber}}{{/if}} | LoopNet.com
var compiler = new FormatCompiler();
var generator = compiler.Compile(strTemplate);
var result = generator.Render(data);
Console.WriteLine(result);