[{"data":1,"prerenderedAt":1936},["Reactive",2],{"navigation":3,"/posts/html-templating-in-xamarin":204,"/posts/html-templating-in-xamarin-surround":1907},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",{"_path":13,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":12,"description":208,"lead":209,"date":210,"image":211,"badge":213,"tags":215,"body":219,"_type":1902,"_id":1903,"_source":1904,"_file":1905,"_extension":1906},"posts",false,"","There are often situations where you need to do some HTML templating and having a powerful HTML templating engine like Razor can be really helpful.\nWhat is nice is that you don't need to be in an ASP.NET context to use Razor templates, in fact, you can even use them in a Xamarin Application.","Razor templates, Handlebars.Net ...","2019-03-10T00:00:00.000Z",{"src":212},"/images/phone_2.jpg",{"label":214},"Development",[216,217,218],"Razor","Xamarin","Templating",{"type":220,"children":221,"toc":1898},"root",[222,229,236,282,294,323,332,337,342,701,706,998,1003,1185,1191,1214,1725,1730,1850,1878,1883,1887,1892],{"type":223,"tag":224,"props":225,"children":226},"element","p",{},[227],{"type":228,"value":208},"text",{"type":223,"tag":230,"props":231,"children":233},"h2",{"id":232},"razor-templates",[234],{"type":228,"value":235},"Razor templates",{"type":223,"tag":224,"props":237,"children":238},{},[239,241,250,252,259,261,267,269,274,276,280],{"type":228,"value":240},"There is already a complete article about Razor HTML templates in Xamarin in the ",{"type":223,"tag":242,"props":243,"children":247},"a",{"href":244,"rel":245},"https://docs.microsoft.com/en-us/xamarin/cross-platform/platform/razor-html-templates/",[246],"nofollow",[248],{"type":228,"value":249},"Microsoft documentation",{"type":228,"value":251}," so if you want an in-depth explanation I suggest you read it. In this article, it is explained how to add a Razor template file (",{"type":223,"tag":253,"props":254,"children":256},"code",{"className":255},[],[257],{"type":228,"value":258},".cshtml",{"type":228,"value":260}," file) to a Xamarin project by using the ",{"type":223,"tag":262,"props":263,"children":264},"em",{},[265],{"type":228,"value":266},"Text Templating",{"type":228,"value":268}," section of the ",{"type":223,"tag":262,"props":270,"children":271},{},[272],{"type":228,"value":273},"New file",{"type":228,"value":275}," dialog.\nHowever, if you try to add a new item in a Xamarin project you won't see a ",{"type":223,"tag":262,"props":277,"children":278},{},[279],{"type":228,"value":266},{"type":228,"value":281}," section.",{"type":223,"tag":224,"props":283,"children":284},{},[285],{"type":223,"tag":286,"props":287,"children":293},"img",{"alt":288,"className":289,"src":292},"Add new item in Xamarin Project in Visual Studio",[290,291],"rounded-lg","mx-auto","/posts/images/htmltemplating_vs_1.png",[],{"type":223,"tag":224,"props":295,"children":296},{},[297,299,306,308,313,315,321],{"type":228,"value":298},"That's because, at the time of writing this article, it only exists in Visual Studio for Mac (probably because it comes from Xamarin Studio). So how to add a Razor template file in Visual Studio (Windows)?\nThere is a little tip to do that (I found it in an old post on ",{"type":223,"tag":242,"props":300,"children":303},{"href":301,"rel":302},"https://stackoverflow.com/questions/39048900/is-there-a-preprocessed-razor-template-for-visual-studio-2015",[246],[304],{"type":228,"value":305},"StackOverflow",{"type":228,"value":307},"): you have to manually add a ",{"type":223,"tag":253,"props":309,"children":311},{"className":310},[],[312],{"type":228,"value":258},{"type":228,"value":314}," file to your project and set the custom tool to ",{"type":223,"tag":253,"props":316,"children":318},{"className":317},[],[319],{"type":228,"value":320},"RazorTemplatePreprocessor",{"type":228,"value":322}," in the properties of the file (this will generate the code-behind file).",{"type":223,"tag":224,"props":324,"children":325},{},[326],{"type":223,"tag":286,"props":327,"children":331},{"alt":328,"className":329,"src":330},"File properties of a cshtml file in Visual Studio",[290,291],"/posts/images/htmltemplating_vs_2.png",[],{"type":223,"tag":224,"props":333,"children":334},{},[335],{"type":228,"value":336},"Then you can generate an HTML string from your Razor template and your data in your Xamarin project.",{"type":223,"tag":224,"props":338,"children":339},{},[340],{"type":228,"value":341},"Code to generate the HTML string:",{"type":223,"tag":343,"props":344,"children":348},"pre",{"className":345,"code":346,"language":347,"meta":207,"style":207},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","var people = new Character[]\n{\n    new Character() { FirstName = \"Ellana\", LastName = \"Caldin\", Job = \"Marchombre\"},\n    new Character() { FirstName = \"Edwin\", LastName = \"Til'Illan\", Job = \"General\"}\n};\nvar template = new RazorTemplate() { Model =  people};\nvar page = template.GenerateString();\n","csharp",[349],{"type":223,"tag":253,"props":350,"children":351},{"__ignoreMap":207},[352,390,399,507,603,612,664],{"type":223,"tag":353,"props":354,"children":357},"span",{"class":355,"line":356},"line",1,[358,364,369,375,380,385],{"type":223,"tag":353,"props":359,"children":361},{"style":360},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[362],{"type":228,"value":363},"var",{"type":223,"tag":353,"props":365,"children":366},{"style":360},[367],{"type":228,"value":368}," people",{"type":223,"tag":353,"props":370,"children":372},{"style":371},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[373],{"type":228,"value":374}," =",{"type":223,"tag":353,"props":376,"children":377},{"style":371},[378],{"type":228,"value":379}," new",{"type":223,"tag":353,"props":381,"children":382},{"style":360},[383],{"type":228,"value":384}," Character",{"type":223,"tag":353,"props":386,"children":387},{"style":371},[388],{"type":228,"value":389},"[]\n",{"type":223,"tag":353,"props":391,"children":393},{"class":355,"line":392},2,[394],{"type":223,"tag":353,"props":395,"children":396},{"style":371},[397],{"type":228,"value":398},"{\n",{"type":223,"tag":353,"props":400,"children":402},{"class":355,"line":401},3,[403,408,412,417,422,428,433,438,444,449,454,459,463,467,472,476,480,485,489,493,498,502],{"type":223,"tag":353,"props":404,"children":405},{"style":371},[406],{"type":228,"value":407},"    new",{"type":223,"tag":353,"props":409,"children":410},{"style":360},[411],{"type":228,"value":384},{"type":223,"tag":353,"props":413,"children":414},{"style":371},[415],{"type":228,"value":416},"()",{"type":223,"tag":353,"props":418,"children":419},{"style":371},[420],{"type":228,"value":421}," {",{"type":223,"tag":353,"props":423,"children":425},{"style":424},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[426],{"type":228,"value":427}," FirstName ",{"type":223,"tag":353,"props":429,"children":430},{"style":371},[431],{"type":228,"value":432},"=",{"type":223,"tag":353,"props":434,"children":435},{"style":371},[436],{"type":228,"value":437}," \"",{"type":223,"tag":353,"props":439,"children":441},{"style":440},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[442],{"type":228,"value":443},"Ellana",{"type":223,"tag":353,"props":445,"children":446},{"style":371},[447],{"type":228,"value":448},"\"",{"type":223,"tag":353,"props":450,"children":451},{"style":371},[452],{"type":228,"value":453},",",{"type":223,"tag":353,"props":455,"children":456},{"style":424},[457],{"type":228,"value":458}," LastName ",{"type":223,"tag":353,"props":460,"children":461},{"style":371},[462],{"type":228,"value":432},{"type":223,"tag":353,"props":464,"children":465},{"style":371},[466],{"type":228,"value":437},{"type":223,"tag":353,"props":468,"children":469},{"style":440},[470],{"type":228,"value":471},"Caldin",{"type":223,"tag":353,"props":473,"children":474},{"style":371},[475],{"type":228,"value":448},{"type":223,"tag":353,"props":477,"children":478},{"style":371},[479],{"type":228,"value":453},{"type":223,"tag":353,"props":481,"children":482},{"style":424},[483],{"type":228,"value":484}," Job ",{"type":223,"tag":353,"props":486,"children":487},{"style":371},[488],{"type":228,"value":432},{"type":223,"tag":353,"props":490,"children":491},{"style":371},[492],{"type":228,"value":437},{"type":223,"tag":353,"props":494,"children":495},{"style":440},[496],{"type":228,"value":497},"Marchombre",{"type":223,"tag":353,"props":499,"children":500},{"style":371},[501],{"type":228,"value":448},{"type":223,"tag":353,"props":503,"children":504},{"style":371},[505],{"type":228,"value":506},"},\n",{"type":223,"tag":353,"props":508,"children":510},{"class":355,"line":509},4,[511,515,519,523,527,531,535,539,544,548,552,556,560,564,569,573,577,581,585,589,594,598],{"type":223,"tag":353,"props":512,"children":513},{"style":371},[514],{"type":228,"value":407},{"type":223,"tag":353,"props":516,"children":517},{"style":360},[518],{"type":228,"value":384},{"type":223,"tag":353,"props":520,"children":521},{"style":371},[522],{"type":228,"value":416},{"type":223,"tag":353,"props":524,"children":525},{"style":371},[526],{"type":228,"value":421},{"type":223,"tag":353,"props":528,"children":529},{"style":424},[530],{"type":228,"value":427},{"type":223,"tag":353,"props":532,"children":533},{"style":371},[534],{"type":228,"value":432},{"type":223,"tag":353,"props":536,"children":537},{"style":371},[538],{"type":228,"value":437},{"type":223,"tag":353,"props":540,"children":541},{"style":440},[542],{"type":228,"value":543},"Edwin",{"type":223,"tag":353,"props":545,"children":546},{"style":371},[547],{"type":228,"value":448},{"type":223,"tag":353,"props":549,"children":550},{"style":371},[551],{"type":228,"value":453},{"type":223,"tag":353,"props":553,"children":554},{"style":424},[555],{"type":228,"value":458},{"type":223,"tag":353,"props":557,"children":558},{"style":371},[559],{"type":228,"value":432},{"type":223,"tag":353,"props":561,"children":562},{"style":371},[563],{"type":228,"value":437},{"type":223,"tag":353,"props":565,"children":566},{"style":440},[567],{"type":228,"value":568},"Til'Illan",{"type":223,"tag":353,"props":570,"children":571},{"style":371},[572],{"type":228,"value":448},{"type":223,"tag":353,"props":574,"children":575},{"style":371},[576],{"type":228,"value":453},{"type":223,"tag":353,"props":578,"children":579},{"style":424},[580],{"type":228,"value":484},{"type":223,"tag":353,"props":582,"children":583},{"style":371},[584],{"type":228,"value":432},{"type":223,"tag":353,"props":586,"children":587},{"style":371},[588],{"type":228,"value":437},{"type":223,"tag":353,"props":590,"children":591},{"style":440},[592],{"type":228,"value":593},"General",{"type":223,"tag":353,"props":595,"children":596},{"style":371},[597],{"type":228,"value":448},{"type":223,"tag":353,"props":599,"children":600},{"style":371},[601],{"type":228,"value":602},"}\n",{"type":223,"tag":353,"props":604,"children":606},{"class":355,"line":605},5,[607],{"type":223,"tag":353,"props":608,"children":609},{"style":371},[610],{"type":228,"value":611},"};\n",{"type":223,"tag":353,"props":613,"children":615},{"class":355,"line":614},6,[616,620,625,629,633,638,642,646,651,655,660],{"type":223,"tag":353,"props":617,"children":618},{"style":360},[619],{"type":228,"value":363},{"type":223,"tag":353,"props":621,"children":622},{"style":360},[623],{"type":228,"value":624}," template",{"type":223,"tag":353,"props":626,"children":627},{"style":371},[628],{"type":228,"value":374},{"type":223,"tag":353,"props":630,"children":631},{"style":371},[632],{"type":228,"value":379},{"type":223,"tag":353,"props":634,"children":635},{"style":360},[636],{"type":228,"value":637}," RazorTemplate",{"type":223,"tag":353,"props":639,"children":640},{"style":371},[641],{"type":228,"value":416},{"type":223,"tag":353,"props":643,"children":644},{"style":371},[645],{"type":228,"value":421},{"type":223,"tag":353,"props":647,"children":648},{"style":424},[649],{"type":228,"value":650}," Model ",{"type":223,"tag":353,"props":652,"children":653},{"style":371},[654],{"type":228,"value":432},{"type":223,"tag":353,"props":656,"children":657},{"style":424},[658],{"type":228,"value":659},"  people",{"type":223,"tag":353,"props":661,"children":662},{"style":371},[663],{"type":228,"value":611},{"type":223,"tag":353,"props":665,"children":667},{"class":355,"line":666},7,[668,672,677,681,685,690,696],{"type":223,"tag":353,"props":669,"children":670},{"style":360},[671],{"type":228,"value":363},{"type":223,"tag":353,"props":673,"children":674},{"style":360},[675],{"type":228,"value":676}," page",{"type":223,"tag":353,"props":678,"children":679},{"style":371},[680],{"type":228,"value":374},{"type":223,"tag":353,"props":682,"children":683},{"style":424},[684],{"type":228,"value":624},{"type":223,"tag":353,"props":686,"children":687},{"style":371},[688],{"type":228,"value":689},".",{"type":223,"tag":353,"props":691,"children":693},{"style":692},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[694],{"type":228,"value":695},"GenerateString",{"type":223,"tag":353,"props":697,"children":698},{"style":371},[699],{"type":228,"value":700},"();\n",{"type":223,"tag":224,"props":702,"children":703},{},[704],{"type":228,"value":705},"Razor template:",{"type":223,"tag":343,"props":707,"children":711},{"className":708,"code":709,"language":710,"meta":207,"style":207},"language-razor shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","@model IEnumerable\u003CPdfGeneration.Models.Character>\n\u003Chtml>\n\u003Cbody>\n    \u003Cul class=\"people\">\n    @foreach (var person in @Model)\n    {\n        \u003Cli>@person.FirstName @person.LastName - @person.Job\u003C/li>\n    }\n    \u003C/ul>\n\u003C/body>\n\u003C/html>\n","razor",[712],{"type":223,"tag":253,"props":713,"children":714},{"__ignoreMap":207},[715,762,779,795,835,873,881,940,949,966,982],{"type":223,"tag":353,"props":716,"children":717},{"class":355,"line":356},[718,724,729,734,739,743,748,752,757],{"type":223,"tag":353,"props":719,"children":721},{"style":720},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[722],{"type":228,"value":723},"@model",{"type":223,"tag":353,"props":725,"children":726},{"style":360},[727],{"type":228,"value":728}," IEnumerable",{"type":223,"tag":353,"props":730,"children":731},{"style":371},[732],{"type":228,"value":733},"\u003C",{"type":223,"tag":353,"props":735,"children":736},{"style":360},[737],{"type":228,"value":738},"PdfGeneration",{"type":223,"tag":353,"props":740,"children":741},{"style":371},[742],{"type":228,"value":689},{"type":223,"tag":353,"props":744,"children":745},{"style":360},[746],{"type":228,"value":747},"Models",{"type":223,"tag":353,"props":749,"children":750},{"style":371},[751],{"type":228,"value":689},{"type":223,"tag":353,"props":753,"children":754},{"style":360},[755],{"type":228,"value":756},"Character",{"type":223,"tag":353,"props":758,"children":759},{"style":371},[760],{"type":228,"value":761},">\n",{"type":223,"tag":353,"props":763,"children":764},{"class":355,"line":392},[765,769,775],{"type":223,"tag":353,"props":766,"children":767},{"style":371},[768],{"type":228,"value":733},{"type":223,"tag":353,"props":770,"children":772},{"style":771},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[773],{"type":228,"value":774},"html",{"type":223,"tag":353,"props":776,"children":777},{"style":371},[778],{"type":228,"value":761},{"type":223,"tag":353,"props":780,"children":781},{"class":355,"line":401},[782,786,791],{"type":223,"tag":353,"props":783,"children":784},{"style":371},[785],{"type":228,"value":733},{"type":223,"tag":353,"props":787,"children":788},{"style":771},[789],{"type":228,"value":790},"body",{"type":223,"tag":353,"props":792,"children":793},{"style":371},[794],{"type":228,"value":761},{"type":223,"tag":353,"props":796,"children":797},{"class":355,"line":509},[798,803,808,814,818,822,827,831],{"type":223,"tag":353,"props":799,"children":800},{"style":371},[801],{"type":228,"value":802},"    \u003C",{"type":223,"tag":353,"props":804,"children":805},{"style":771},[806],{"type":228,"value":807},"ul",{"type":223,"tag":353,"props":809,"children":811},{"style":810},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[812],{"type":228,"value":813}," class",{"type":223,"tag":353,"props":815,"children":816},{"style":371},[817],{"type":228,"value":432},{"type":223,"tag":353,"props":819,"children":820},{"style":371},[821],{"type":228,"value":448},{"type":223,"tag":353,"props":823,"children":824},{"style":440},[825],{"type":228,"value":826},"people",{"type":223,"tag":353,"props":828,"children":829},{"style":371},[830],{"type":228,"value":448},{"type":223,"tag":353,"props":832,"children":833},{"style":371},[834],{"type":228,"value":761},{"type":223,"tag":353,"props":836,"children":837},{"class":355,"line":605},[838,843,848,853,858,863,868],{"type":223,"tag":353,"props":839,"children":840},{"style":720},[841],{"type":228,"value":842},"    @foreach",{"type":223,"tag":353,"props":844,"children":845},{"style":371},[846],{"type":228,"value":847}," (",{"type":223,"tag":353,"props":849,"children":851},{"style":850},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[852],{"type":228,"value":363},{"type":223,"tag":353,"props":854,"children":855},{"style":360},[856],{"type":228,"value":857}," person",{"type":223,"tag":353,"props":859,"children":860},{"style":720},[861],{"type":228,"value":862}," in",{"type":223,"tag":353,"props":864,"children":865},{"style":424},[866],{"type":228,"value":867}," @Model",{"type":223,"tag":353,"props":869,"children":870},{"style":371},[871],{"type":228,"value":872},")\n",{"type":223,"tag":353,"props":874,"children":875},{"class":355,"line":614},[876],{"type":223,"tag":353,"props":877,"children":878},{"style":371},[879],{"type":228,"value":880},"    {\n",{"type":223,"tag":353,"props":882,"children":883},{"class":355,"line":666},[884,889,894,899,904,909,913,918,922,927,932,936],{"type":223,"tag":353,"props":885,"children":886},{"style":371},[887],{"type":228,"value":888},"        \u003C",{"type":223,"tag":353,"props":890,"children":891},{"style":771},[892],{"type":228,"value":893},"li",{"type":223,"tag":353,"props":895,"children":896},{"style":371},[897],{"type":228,"value":898},">",{"type":223,"tag":353,"props":900,"children":901},{"style":720},[902],{"type":228,"value":903},"@",{"type":223,"tag":353,"props":905,"children":906},{"style":424},[907],{"type":228,"value":908},"person.FirstName ",{"type":223,"tag":353,"props":910,"children":911},{"style":720},[912],{"type":228,"value":903},{"type":223,"tag":353,"props":914,"children":915},{"style":424},[916],{"type":228,"value":917},"person.LastName - ",{"type":223,"tag":353,"props":919,"children":920},{"style":720},[921],{"type":228,"value":903},{"type":223,"tag":353,"props":923,"children":924},{"style":424},[925],{"type":228,"value":926},"person.Job",{"type":223,"tag":353,"props":928,"children":929},{"style":371},[930],{"type":228,"value":931},"\u003C/",{"type":223,"tag":353,"props":933,"children":934},{"style":771},[935],{"type":228,"value":893},{"type":223,"tag":353,"props":937,"children":938},{"style":371},[939],{"type":228,"value":761},{"type":223,"tag":353,"props":941,"children":943},{"class":355,"line":942},8,[944],{"type":223,"tag":353,"props":945,"children":946},{"style":371},[947],{"type":228,"value":948},"    }\n",{"type":223,"tag":353,"props":950,"children":952},{"class":355,"line":951},9,[953,958,962],{"type":223,"tag":353,"props":954,"children":955},{"style":371},[956],{"type":228,"value":957},"    \u003C/",{"type":223,"tag":353,"props":959,"children":960},{"style":771},[961],{"type":228,"value":807},{"type":223,"tag":353,"props":963,"children":964},{"style":371},[965],{"type":228,"value":761},{"type":223,"tag":353,"props":967,"children":969},{"class":355,"line":968},10,[970,974,978],{"type":223,"tag":353,"props":971,"children":972},{"style":371},[973],{"type":228,"value":931},{"type":223,"tag":353,"props":975,"children":976},{"style":771},[977],{"type":228,"value":790},{"type":223,"tag":353,"props":979,"children":980},{"style":371},[981],{"type":228,"value":761},{"type":223,"tag":353,"props":983,"children":985},{"class":355,"line":984},11,[986,990,994],{"type":223,"tag":353,"props":987,"children":988},{"style":371},[989],{"type":228,"value":931},{"type":223,"tag":353,"props":991,"children":992},{"style":771},[993],{"type":228,"value":774},{"type":223,"tag":353,"props":995,"children":996},{"style":371},[997],{"type":228,"value":761},{"type":223,"tag":224,"props":999,"children":1000},{},[1001],{"type":228,"value":1002},"This code produces the following html:",{"type":223,"tag":343,"props":1004,"children":1007},{"className":1005,"code":1006,"language":774,"meta":207,"style":207},"language-html shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Chtml>\n\u003Cbody>\n    \u003Cul class=\"people\">\n        \u003Cli>Ellana Caldin - Marchombre\u003C/li>\n        \u003Cli>Edwin Til&#39;Illan - General\u003C/li>\n    \u003C/ul>\n\u003C/body>\n\u003C/html>\n",[1008],{"type":223,"tag":253,"props":1009,"children":1010},{"__ignoreMap":207},[1011,1026,1041,1076,1108,1140,1155,1170],{"type":223,"tag":353,"props":1012,"children":1013},{"class":355,"line":356},[1014,1018,1022],{"type":223,"tag":353,"props":1015,"children":1016},{"style":371},[1017],{"type":228,"value":733},{"type":223,"tag":353,"props":1019,"children":1020},{"style":771},[1021],{"type":228,"value":774},{"type":223,"tag":353,"props":1023,"children":1024},{"style":371},[1025],{"type":228,"value":761},{"type":223,"tag":353,"props":1027,"children":1028},{"class":355,"line":392},[1029,1033,1037],{"type":223,"tag":353,"props":1030,"children":1031},{"style":371},[1032],{"type":228,"value":733},{"type":223,"tag":353,"props":1034,"children":1035},{"style":771},[1036],{"type":228,"value":790},{"type":223,"tag":353,"props":1038,"children":1039},{"style":371},[1040],{"type":228,"value":761},{"type":223,"tag":353,"props":1042,"children":1043},{"class":355,"line":401},[1044,1048,1052,1056,1060,1064,1068,1072],{"type":223,"tag":353,"props":1045,"children":1046},{"style":371},[1047],{"type":228,"value":802},{"type":223,"tag":353,"props":1049,"children":1050},{"style":771},[1051],{"type":228,"value":807},{"type":223,"tag":353,"props":1053,"children":1054},{"style":810},[1055],{"type":228,"value":813},{"type":223,"tag":353,"props":1057,"children":1058},{"style":371},[1059],{"type":228,"value":432},{"type":223,"tag":353,"props":1061,"children":1062},{"style":371},[1063],{"type":228,"value":448},{"type":223,"tag":353,"props":1065,"children":1066},{"style":440},[1067],{"type":228,"value":826},{"type":223,"tag":353,"props":1069,"children":1070},{"style":371},[1071],{"type":228,"value":448},{"type":223,"tag":353,"props":1073,"children":1074},{"style":371},[1075],{"type":228,"value":761},{"type":223,"tag":353,"props":1077,"children":1078},{"class":355,"line":509},[1079,1083,1087,1091,1096,1100,1104],{"type":223,"tag":353,"props":1080,"children":1081},{"style":371},[1082],{"type":228,"value":888},{"type":223,"tag":353,"props":1084,"children":1085},{"style":771},[1086],{"type":228,"value":893},{"type":223,"tag":353,"props":1088,"children":1089},{"style":371},[1090],{"type":228,"value":898},{"type":223,"tag":353,"props":1092,"children":1093},{"style":424},[1094],{"type":228,"value":1095},"Ellana Caldin - Marchombre",{"type":223,"tag":353,"props":1097,"children":1098},{"style":371},[1099],{"type":228,"value":931},{"type":223,"tag":353,"props":1101,"children":1102},{"style":771},[1103],{"type":228,"value":893},{"type":223,"tag":353,"props":1105,"children":1106},{"style":371},[1107],{"type":228,"value":761},{"type":223,"tag":353,"props":1109,"children":1110},{"class":355,"line":605},[1111,1115,1119,1123,1128,1132,1136],{"type":223,"tag":353,"props":1112,"children":1113},{"style":371},[1114],{"type":228,"value":888},{"type":223,"tag":353,"props":1116,"children":1117},{"style":771},[1118],{"type":228,"value":893},{"type":223,"tag":353,"props":1120,"children":1121},{"style":371},[1122],{"type":228,"value":898},{"type":223,"tag":353,"props":1124,"children":1125},{"style":424},[1126],{"type":228,"value":1127},"Edwin Til&#39;Illan - General",{"type":223,"tag":353,"props":1129,"children":1130},{"style":371},[1131],{"type":228,"value":931},{"type":223,"tag":353,"props":1133,"children":1134},{"style":771},[1135],{"type":228,"value":893},{"type":223,"tag":353,"props":1137,"children":1138},{"style":371},[1139],{"type":228,"value":761},{"type":223,"tag":353,"props":1141,"children":1142},{"class":355,"line":614},[1143,1147,1151],{"type":223,"tag":353,"props":1144,"children":1145},{"style":371},[1146],{"type":228,"value":957},{"type":223,"tag":353,"props":1148,"children":1149},{"style":771},[1150],{"type":228,"value":807},{"type":223,"tag":353,"props":1152,"children":1153},{"style":371},[1154],{"type":228,"value":761},{"type":223,"tag":353,"props":1156,"children":1157},{"class":355,"line":666},[1158,1162,1166],{"type":223,"tag":353,"props":1159,"children":1160},{"style":371},[1161],{"type":228,"value":931},{"type":223,"tag":353,"props":1163,"children":1164},{"style":771},[1165],{"type":228,"value":790},{"type":223,"tag":353,"props":1167,"children":1168},{"style":371},[1169],{"type":228,"value":761},{"type":223,"tag":353,"props":1171,"children":1172},{"class":355,"line":942},[1173,1177,1181],{"type":223,"tag":353,"props":1174,"children":1175},{"style":371},[1176],{"type":228,"value":931},{"type":223,"tag":353,"props":1178,"children":1179},{"style":771},[1180],{"type":228,"value":774},{"type":223,"tag":353,"props":1182,"children":1183},{"style":371},[1184],{"type":228,"value":761},{"type":223,"tag":230,"props":1186,"children":1188},{"id":1187},"handlebarsnet-an-alternative-to-razor-templates",[1189],{"type":228,"value":1190},"Handlebars.Net, an alternative to Razor templates",{"type":223,"tag":224,"props":1192,"children":1193},{},[1194,1196,1203,1205,1212],{"type":228,"value":1195},"You can also do HTML templating by using ",{"type":223,"tag":242,"props":1197,"children":1200},{"href":1198,"rel":1199},"https://github.com/rexm/Handlebars.Net",[246],[1201],{"type":228,"value":1202},"Handlebars.Net",{"type":228,"value":1204}," which is a .NET Handlebars engine. It allows to build semantic templates in a .NET application. It uses the same syntax than ",{"type":223,"tag":242,"props":1206,"children":1209},{"href":1207,"rel":1208},"http://handlebarsjs.com/",[246],[1210],{"type":228,"value":1211},"handlebars.js",{"type":228,"value":1213}," for the templates and try to mimic the JS API. Nothing better than a piece of code to illustrate that:",{"type":223,"tag":343,"props":1215,"children":1218},{"className":345,"code":1216,"filename":1217,"language":347,"meta":207,"style":207},"#r \"nuget: Handlebars.Net, 1.9.5\"\n\nusing HandlebarsDotNet;\nstring html = @\"\n\u003Cul class=\"\"people\"\">\n  {{#each people}}\n    \u003Cli>{{FirstName}} {{LastName}} - {{Job}}\u003C/li>\n  {{/each}}\n\u003C/ul>\";\n\nvar data = new \n{\n    people = new [] \n    {\n        new { FirstName = \"Ellana\", LastName = \"Caldin\", Job = \"Marchombre\"},\n        new { FirstName = \"Edwin\", LastName = \"Til'Illan\", Job = \"General\"}\n    }\n};\n\nvar template = Handlebars.Compile(html);\nstring result = template(data);\nConsole.WriteLine(result);\n","TestingHandlebars.csx",[1219],{"type":223,"tag":253,"props":1220,"children":1221},{"__ignoreMap":207},[1222,1235,1244,1262,1284,1309,1317,1325,1333,1349,1356,1381,1389,1415,1423,1508,1592,1600,1608,1616,1660,1694],{"type":223,"tag":353,"props":1223,"children":1224},{"class":355,"line":356},[1225,1230],{"type":223,"tag":353,"props":1226,"children":1227},{"style":371},[1228],{"type":228,"value":1229},"#r",{"type":223,"tag":353,"props":1231,"children":1232},{"style":440},[1233],{"type":228,"value":1234}," \"nuget: Handlebars.Net, 1.9.5\"\n",{"type":223,"tag":353,"props":1236,"children":1237},{"class":355,"line":392},[1238],{"type":223,"tag":353,"props":1239,"children":1241},{"emptyLinePlaceholder":1240},true,[1242],{"type":228,"value":1243},"\n",{"type":223,"tag":353,"props":1245,"children":1246},{"class":355,"line":401},[1247,1252,1257],{"type":223,"tag":353,"props":1248,"children":1249},{"style":850},[1250],{"type":228,"value":1251},"using",{"type":223,"tag":353,"props":1253,"children":1254},{"style":424},[1255],{"type":228,"value":1256}," HandlebarsDotNet",{"type":223,"tag":353,"props":1258,"children":1259},{"style":371},[1260],{"type":228,"value":1261},";\n",{"type":223,"tag":353,"props":1263,"children":1264},{"class":355,"line":509},[1265,1270,1275,1279],{"type":223,"tag":353,"props":1266,"children":1267},{"style":371},[1268],{"type":228,"value":1269},"string",{"type":223,"tag":353,"props":1271,"children":1272},{"style":360},[1273],{"type":228,"value":1274}," html",{"type":223,"tag":353,"props":1276,"children":1277},{"style":371},[1278],{"type":228,"value":374},{"type":223,"tag":353,"props":1280,"children":1281},{"style":371},[1282],{"type":228,"value":1283}," @\"\n",{"type":223,"tag":353,"props":1285,"children":1286},{"class":355,"line":605},[1287,1292,1297,1301,1305],{"type":223,"tag":353,"props":1288,"children":1289},{"style":440},[1290],{"type":228,"value":1291},"\u003Cul class=",{"type":223,"tag":353,"props":1293,"children":1294},{"style":424},[1295],{"type":228,"value":1296},"\"\"",{"type":223,"tag":353,"props":1298,"children":1299},{"style":440},[1300],{"type":228,"value":826},{"type":223,"tag":353,"props":1302,"children":1303},{"style":424},[1304],{"type":228,"value":1296},{"type":223,"tag":353,"props":1306,"children":1307},{"style":440},[1308],{"type":228,"value":761},{"type":223,"tag":353,"props":1310,"children":1311},{"class":355,"line":614},[1312],{"type":223,"tag":353,"props":1313,"children":1314},{"style":440},[1315],{"type":228,"value":1316},"  {{#each people}}\n",{"type":223,"tag":353,"props":1318,"children":1319},{"class":355,"line":666},[1320],{"type":223,"tag":353,"props":1321,"children":1322},{"style":440},[1323],{"type":228,"value":1324},"    \u003Cli>{{FirstName}} {{LastName}} - {{Job}}\u003C/li>\n",{"type":223,"tag":353,"props":1326,"children":1327},{"class":355,"line":942},[1328],{"type":223,"tag":353,"props":1329,"children":1330},{"style":440},[1331],{"type":228,"value":1332},"  {{/each}}\n",{"type":223,"tag":353,"props":1334,"children":1335},{"class":355,"line":951},[1336,1341,1345],{"type":223,"tag":353,"props":1337,"children":1338},{"style":440},[1339],{"type":228,"value":1340},"\u003C/ul>",{"type":223,"tag":353,"props":1342,"children":1343},{"style":371},[1344],{"type":228,"value":448},{"type":223,"tag":353,"props":1346,"children":1347},{"style":371},[1348],{"type":228,"value":1261},{"type":223,"tag":353,"props":1350,"children":1351},{"class":355,"line":968},[1352],{"type":223,"tag":353,"props":1353,"children":1354},{"emptyLinePlaceholder":1240},[1355],{"type":228,"value":1243},{"type":223,"tag":353,"props":1357,"children":1358},{"class":355,"line":984},[1359,1363,1368,1372,1376],{"type":223,"tag":353,"props":1360,"children":1361},{"style":360},[1362],{"type":228,"value":363},{"type":223,"tag":353,"props":1364,"children":1365},{"style":360},[1366],{"type":228,"value":1367}," data",{"type":223,"tag":353,"props":1369,"children":1370},{"style":371},[1371],{"type":228,"value":374},{"type":223,"tag":353,"props":1373,"children":1374},{"style":371},[1375],{"type":228,"value":379},{"type":223,"tag":353,"props":1377,"children":1378},{"style":424},[1379],{"type":228,"value":1380}," \n",{"type":223,"tag":353,"props":1382,"children":1384},{"class":355,"line":1383},12,[1385],{"type":223,"tag":353,"props":1386,"children":1387},{"style":371},[1388],{"type":228,"value":398},{"type":223,"tag":353,"props":1390,"children":1392},{"class":355,"line":1391},13,[1393,1398,1402,1406,1411],{"type":223,"tag":353,"props":1394,"children":1395},{"style":424},[1396],{"type":228,"value":1397},"    people ",{"type":223,"tag":353,"props":1399,"children":1400},{"style":371},[1401],{"type":228,"value":432},{"type":223,"tag":353,"props":1403,"children":1404},{"style":371},[1405],{"type":228,"value":379},{"type":223,"tag":353,"props":1407,"children":1408},{"style":371},[1409],{"type":228,"value":1410}," []",{"type":223,"tag":353,"props":1412,"children":1413},{"style":424},[1414],{"type":228,"value":1380},{"type":223,"tag":353,"props":1416,"children":1418},{"class":355,"line":1417},14,[1419],{"type":223,"tag":353,"props":1420,"children":1421},{"style":371},[1422],{"type":228,"value":880},{"type":223,"tag":353,"props":1424,"children":1426},{"class":355,"line":1425},15,[1427,1432,1436,1440,1444,1448,1452,1456,1460,1464,1468,1472,1476,1480,1484,1488,1492,1496,1500,1504],{"type":223,"tag":353,"props":1428,"children":1429},{"style":371},[1430],{"type":228,"value":1431},"        new",{"type":223,"tag":353,"props":1433,"children":1434},{"style":371},[1435],{"type":228,"value":421},{"type":223,"tag":353,"props":1437,"children":1438},{"style":424},[1439],{"type":228,"value":427},{"type":223,"tag":353,"props":1441,"children":1442},{"style":371},[1443],{"type":228,"value":432},{"type":223,"tag":353,"props":1445,"children":1446},{"style":371},[1447],{"type":228,"value":437},{"type":223,"tag":353,"props":1449,"children":1450},{"style":440},[1451],{"type":228,"value":443},{"type":223,"tag":353,"props":1453,"children":1454},{"style":371},[1455],{"type":228,"value":448},{"type":223,"tag":353,"props":1457,"children":1458},{"style":371},[1459],{"type":228,"value":453},{"type":223,"tag":353,"props":1461,"children":1462},{"style":424},[1463],{"type":228,"value":458},{"type":223,"tag":353,"props":1465,"children":1466},{"style":371},[1467],{"type":228,"value":432},{"type":223,"tag":353,"props":1469,"children":1470},{"style":371},[1471],{"type":228,"value":437},{"type":223,"tag":353,"props":1473,"children":1474},{"style":440},[1475],{"type":228,"value":471},{"type":223,"tag":353,"props":1477,"children":1478},{"style":371},[1479],{"type":228,"value":448},{"type":223,"tag":353,"props":1481,"children":1482},{"style":371},[1483],{"type":228,"value":453},{"type":223,"tag":353,"props":1485,"children":1486},{"style":424},[1487],{"type":228,"value":484},{"type":223,"tag":353,"props":1489,"children":1490},{"style":371},[1491],{"type":228,"value":432},{"type":223,"tag":353,"props":1493,"children":1494},{"style":371},[1495],{"type":228,"value":437},{"type":223,"tag":353,"props":1497,"children":1498},{"style":440},[1499],{"type":228,"value":497},{"type":223,"tag":353,"props":1501,"children":1502},{"style":371},[1503],{"type":228,"value":448},{"type":223,"tag":353,"props":1505,"children":1506},{"style":371},[1507],{"type":228,"value":506},{"type":223,"tag":353,"props":1509,"children":1511},{"class":355,"line":1510},16,[1512,1516,1520,1524,1528,1532,1536,1540,1544,1548,1552,1556,1560,1564,1568,1572,1576,1580,1584,1588],{"type":223,"tag":353,"props":1513,"children":1514},{"style":371},[1515],{"type":228,"value":1431},{"type":223,"tag":353,"props":1517,"children":1518},{"style":371},[1519],{"type":228,"value":421},{"type":223,"tag":353,"props":1521,"children":1522},{"style":424},[1523],{"type":228,"value":427},{"type":223,"tag":353,"props":1525,"children":1526},{"style":371},[1527],{"type":228,"value":432},{"type":223,"tag":353,"props":1529,"children":1530},{"style":371},[1531],{"type":228,"value":437},{"type":223,"tag":353,"props":1533,"children":1534},{"style":440},[1535],{"type":228,"value":543},{"type":223,"tag":353,"props":1537,"children":1538},{"style":371},[1539],{"type":228,"value":448},{"type":223,"tag":353,"props":1541,"children":1542},{"style":371},[1543],{"type":228,"value":453},{"type":223,"tag":353,"props":1545,"children":1546},{"style":424},[1547],{"type":228,"value":458},{"type":223,"tag":353,"props":1549,"children":1550},{"style":371},[1551],{"type":228,"value":432},{"type":223,"tag":353,"props":1553,"children":1554},{"style":371},[1555],{"type":228,"value":437},{"type":223,"tag":353,"props":1557,"children":1558},{"style":440},[1559],{"type":228,"value":568},{"type":223,"tag":353,"props":1561,"children":1562},{"style":371},[1563],{"type":228,"value":448},{"type":223,"tag":353,"props":1565,"children":1566},{"style":371},[1567],{"type":228,"value":453},{"type":223,"tag":353,"props":1569,"children":1570},{"style":424},[1571],{"type":228,"value":484},{"type":223,"tag":353,"props":1573,"children":1574},{"style":371},[1575],{"type":228,"value":432},{"type":223,"tag":353,"props":1577,"children":1578},{"style":371},[1579],{"type":228,"value":437},{"type":223,"tag":353,"props":1581,"children":1582},{"style":440},[1583],{"type":228,"value":593},{"type":223,"tag":353,"props":1585,"children":1586},{"style":371},[1587],{"type":228,"value":448},{"type":223,"tag":353,"props":1589,"children":1590},{"style":371},[1591],{"type":228,"value":602},{"type":223,"tag":353,"props":1593,"children":1595},{"class":355,"line":1594},17,[1596],{"type":223,"tag":353,"props":1597,"children":1598},{"style":371},[1599],{"type":228,"value":948},{"type":223,"tag":353,"props":1601,"children":1603},{"class":355,"line":1602},18,[1604],{"type":223,"tag":353,"props":1605,"children":1606},{"style":371},[1607],{"type":228,"value":611},{"type":223,"tag":353,"props":1609,"children":1611},{"class":355,"line":1610},19,[1612],{"type":223,"tag":353,"props":1613,"children":1614},{"emptyLinePlaceholder":1240},[1615],{"type":228,"value":1243},{"type":223,"tag":353,"props":1617,"children":1619},{"class":355,"line":1618},20,[1620,1624,1628,1632,1637,1641,1646,1651,1655],{"type":223,"tag":353,"props":1621,"children":1622},{"style":360},[1623],{"type":228,"value":363},{"type":223,"tag":353,"props":1625,"children":1626},{"style":360},[1627],{"type":228,"value":624},{"type":223,"tag":353,"props":1629,"children":1630},{"style":371},[1631],{"type":228,"value":374},{"type":223,"tag":353,"props":1633,"children":1634},{"style":424},[1635],{"type":228,"value":1636}," Handlebars",{"type":223,"tag":353,"props":1638,"children":1639},{"style":371},[1640],{"type":228,"value":689},{"type":223,"tag":353,"props":1642,"children":1643},{"style":692},[1644],{"type":228,"value":1645},"Compile",{"type":223,"tag":353,"props":1647,"children":1648},{"style":371},[1649],{"type":228,"value":1650},"(",{"type":223,"tag":353,"props":1652,"children":1653},{"style":424},[1654],{"type":228,"value":774},{"type":223,"tag":353,"props":1656,"children":1657},{"style":371},[1658],{"type":228,"value":1659},");\n",{"type":223,"tag":353,"props":1661,"children":1663},{"class":355,"line":1662},21,[1664,1668,1673,1677,1681,1685,1690],{"type":223,"tag":353,"props":1665,"children":1666},{"style":371},[1667],{"type":228,"value":1269},{"type":223,"tag":353,"props":1669,"children":1670},{"style":360},[1671],{"type":228,"value":1672}," result",{"type":223,"tag":353,"props":1674,"children":1675},{"style":371},[1676],{"type":228,"value":374},{"type":223,"tag":353,"props":1678,"children":1679},{"style":692},[1680],{"type":228,"value":624},{"type":223,"tag":353,"props":1682,"children":1683},{"style":371},[1684],{"type":228,"value":1650},{"type":223,"tag":353,"props":1686,"children":1687},{"style":424},[1688],{"type":228,"value":1689},"data",{"type":223,"tag":353,"props":1691,"children":1692},{"style":371},[1693],{"type":228,"value":1659},{"type":223,"tag":353,"props":1695,"children":1697},{"class":355,"line":1696},22,[1698,1703,1707,1712,1716,1721],{"type":223,"tag":353,"props":1699,"children":1700},{"style":424},[1701],{"type":228,"value":1702},"Console",{"type":223,"tag":353,"props":1704,"children":1705},{"style":371},[1706],{"type":228,"value":689},{"type":223,"tag":353,"props":1708,"children":1709},{"style":692},[1710],{"type":228,"value":1711},"WriteLine",{"type":223,"tag":353,"props":1713,"children":1714},{"style":371},[1715],{"type":228,"value":1650},{"type":223,"tag":353,"props":1717,"children":1718},{"style":424},[1719],{"type":228,"value":1720},"result",{"type":223,"tag":353,"props":1722,"children":1723},{"style":371},[1724],{"type":228,"value":1659},{"type":223,"tag":224,"props":1726,"children":1727},{},[1728],{"type":228,"value":1729},"This produces the following html:",{"type":223,"tag":343,"props":1731,"children":1733},{"className":1005,"code":1732,"language":774,"meta":207,"style":207},"\u003Cul class=\"people\">\n    \u003Cli>Ellana Caldin - Marchombre\u003C/li>\n    \u003Cli>Edwin Til'Illan - General\u003C/li>\n\u003C/ul>\n",[1734],{"type":223,"tag":253,"props":1735,"children":1736},{"__ignoreMap":207},[1737,1772,1803,1835],{"type":223,"tag":353,"props":1738,"children":1739},{"class":355,"line":356},[1740,1744,1748,1752,1756,1760,1764,1768],{"type":223,"tag":353,"props":1741,"children":1742},{"style":371},[1743],{"type":228,"value":733},{"type":223,"tag":353,"props":1745,"children":1746},{"style":771},[1747],{"type":228,"value":807},{"type":223,"tag":353,"props":1749,"children":1750},{"style":810},[1751],{"type":228,"value":813},{"type":223,"tag":353,"props":1753,"children":1754},{"style":371},[1755],{"type":228,"value":432},{"type":223,"tag":353,"props":1757,"children":1758},{"style":371},[1759],{"type":228,"value":448},{"type":223,"tag":353,"props":1761,"children":1762},{"style":440},[1763],{"type":228,"value":826},{"type":223,"tag":353,"props":1765,"children":1766},{"style":371},[1767],{"type":228,"value":448},{"type":223,"tag":353,"props":1769,"children":1770},{"style":371},[1771],{"type":228,"value":761},{"type":223,"tag":353,"props":1773,"children":1774},{"class":355,"line":392},[1775,1779,1783,1787,1791,1795,1799],{"type":223,"tag":353,"props":1776,"children":1777},{"style":371},[1778],{"type":228,"value":802},{"type":223,"tag":353,"props":1780,"children":1781},{"style":771},[1782],{"type":228,"value":893},{"type":223,"tag":353,"props":1784,"children":1785},{"style":371},[1786],{"type":228,"value":898},{"type":223,"tag":353,"props":1788,"children":1789},{"style":424},[1790],{"type":228,"value":1095},{"type":223,"tag":353,"props":1792,"children":1793},{"style":371},[1794],{"type":228,"value":931},{"type":223,"tag":353,"props":1796,"children":1797},{"style":771},[1798],{"type":228,"value":893},{"type":223,"tag":353,"props":1800,"children":1801},{"style":371},[1802],{"type":228,"value":761},{"type":223,"tag":353,"props":1804,"children":1805},{"class":355,"line":401},[1806,1810,1814,1818,1823,1827,1831],{"type":223,"tag":353,"props":1807,"children":1808},{"style":371},[1809],{"type":228,"value":802},{"type":223,"tag":353,"props":1811,"children":1812},{"style":771},[1813],{"type":228,"value":893},{"type":223,"tag":353,"props":1815,"children":1816},{"style":371},[1817],{"type":228,"value":898},{"type":223,"tag":353,"props":1819,"children":1820},{"style":424},[1821],{"type":228,"value":1822},"Edwin Til'Illan - General",{"type":223,"tag":353,"props":1824,"children":1825},{"style":371},[1826],{"type":228,"value":931},{"type":223,"tag":353,"props":1828,"children":1829},{"style":771},[1830],{"type":228,"value":893},{"type":223,"tag":353,"props":1832,"children":1833},{"style":371},[1834],{"type":228,"value":761},{"type":223,"tag":353,"props":1836,"children":1837},{"class":355,"line":509},[1838,1842,1846],{"type":223,"tag":353,"props":1839,"children":1840},{"style":371},[1841],{"type":228,"value":931},{"type":223,"tag":353,"props":1843,"children":1844},{"style":771},[1845],{"type":228,"value":807},{"type":223,"tag":353,"props":1847,"children":1848},{"style":371},[1849],{"type":228,"value":761},{"type":223,"tag":224,"props":1851,"children":1852},{},[1853,1855,1860,1862,1869,1871,1877],{"type":228,"value":1854},"The code above ",{"type":223,"tag":253,"props":1856,"children":1858},{"className":1857},[],[1859],{"type":228,"value":1217},{"type":228,"value":1861}," is a C# script so if you have ",{"type":223,"tag":242,"props":1863,"children":1866},{"href":1864,"rel":1865},"https://github.com/filipw/dotnet-script",[246],[1867],{"type":228,"value":1868},"dotnet-script",{"type":228,"value":1870}," installed you can run it just by copy/pasting the following command in your terminal: ",{"type":223,"tag":253,"props":1872,"children":1874},{"className":1873},[],[1875],{"type":228,"value":1876},"dotnet script http://tinyurl.com/y5vvv2nm",{"type":228,"value":689},{"type":223,"tag":224,"props":1879,"children":1880},{},[1881],{"type":228,"value":1882},"Using Handlebars.Net is pretty simple and quite powerful. Moreover it runs fine on Xamarin too 👌.",{"type":223,"tag":1884,"props":1885,"children":1886},"hr",{},[],{"type":223,"tag":224,"props":1888,"children":1889},{},[1890],{"type":228,"value":1891},"So now you have 2 solutions to do HTML templating in Xamarin, choose the one you like the best.",{"type":223,"tag":1893,"props":1894,"children":1895},"style",{},[1896],{"type":228,"value":1897},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":207,"searchDepth":392,"depth":392,"links":1899},[1900,1901],{"id":232,"depth":392,"text":235},{"id":1187,"depth":392,"text":1190},"markdown","content:1.posts:2.html-templating-in-xamarin.md","content","1.posts/2.html-templating-in-xamarin.md","md",[1908,1922],{"_path":16,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":15,"description":1909,"lead":1910,"date":1911,"image":1912,"badge":1914,"tags":1916,"_type":1902,"_id":1920,"_source":1904,"_file":1921,"_extension":1906},"Let's jum into Azure CLI to manage Azure resources. The article will show the syntax, the main functionalities and some less-known features like Azure CLI interactive mode.","Let's jump into Azure CLI!","2019-04-08T00:00:00.000Z",{"src":1913},"/images/green-characters.jpg",{"label":1915},"Tooling",[1917,1918,1919],"Azure CLI","Azure","shell","content:1.posts:3.welcome-azure-cli.md","1.posts/3.welcome-azure-cli.md",{"_path":10,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":9,"description":1923,"lead":1924,"date":1925,"image":1926,"badge":1928,"tags":1929,"_type":1902,"_id":1934,"_source":1904,"_file":1935,"_extension":1906},"Let's talk about tooling and testing an API!","Why using the vscode extension \"REST Client\" instead of Postman?","2019-03-05T00:00:00.000Z",{"src":1927},"/images/swiss_knifes.jpg",{"label":1915},[1930,1931,1932,1933],"tooling","vscode","rest","HTTP","content:1.posts:1.testing-your-api-with-rest-client.md","1.posts/1.testing-your-api-with-rest-client.md",1716749612221]