[{"data":1,"prerenderedAt":6279},["Reactive",2],{"navigation":3,"aAII9Cz3yR":204,"tags-advent":397},[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",[205,207,209,211,214,217,220,223,226,229,231,234,237,240,242,244,247,250,253,255,258,261,264,267,270,273,276,279,282,285,287,289,292,294,297,300,303,305,308,310,313,316,319,322,325,327,329,332,335,338,341,344,347,350,353,356,359,361,363,366,369,372,375,377,380,383,385,388,391,394],[206,206],"tooling",[208,208],"vscode",[210,210],"rest",[212,213],"http","HTTP",[215,216],"razor","Razor",[218,219],"xamarin","Xamarin",[221,222],"templating","Templating",[224,225],"azure-cli","Azure CLI",[227,228],"azure","Azure",[230,230],"shell",[232,233],"github","GitHub",[235,236],"asp-net-core","ASP.NET Core",[238,239],"net",".NET",[241,241],"git",[243,243],"nushell",[245,246],"microsoft-teams","Microsoft Teams",[248,249],"powershell","PowerShell",[251,252],"azure-active-directory","Azure Active Directory",[254,254],"learning",[256,257],"azure-functions","Azure Functions",[259,260],"azure-key-vault","Azure Key Vault",[262,263],"configuration","Configuration",[265,266],"devops","DevOps",[268,269],"it","IT",[271,272],"tips-learned-this-week","tips learned this week",[274,275],"windows-terminal","Windows Terminal",[277,278],"azure-pipelines","Azure Pipelines",[280,281],"application-insights","Application Insights",[283,284],"azure-iot","Azure IoT",[286,286],"records",[288,288],"refit",[290,291],"development-box-setup","development box setup",[293,293],"winget",[295,296],"package-manager","package manager",[298,299],"azure-sql-database","Azure SQL Database",[301,302],"azure-sdk","Azure SDK",[304,304],"wingetcreate",[306,307],"github-actions","GitHub Actions",[309,309],"jq",[311,312],"pulumi","Pulumi",[314,315],"iac","IaC",[317,318],"azure-storage","Azure Storage",[320,321],"azure-signalr","Azure SignalR",[323,324],"visio","Visio",[326,326],"csharp",[328,328],"jest",[330,331],"statiq","Statiq",[333,334],"open-source","open source",[336,337],"visual-studio","Visual Studio",[339,340],"vue-js","Vue.js",[342,343],"azure-devops","Azure DevOps",[345,346],"vite","Vite",[348,349],"code-analysis","Code analysis",[351,352],"diagram","Diagram",[354,355],"terraform","Terraform",[357,358],"typescript","TypeScript",[360,360],"thoughts",[362,362],"pnpm",[364,365],"nuke","Nuke",[367,368],"pipelines","Pipelines",[370,371],"cicd","CI/CD",[373,374],"openid-connect","OpenID Connect",[376,376],"security",[378,379],"github-cli","GitHub CLI",[381,382],"microsoft-entra-id","Microsoft Entra ID",[384,384],"advent",[386,387],"finops","FinOps",[389,390],"anglesharp","AngleSharp",[392,393],"oauth2","OAuth2",[395,396],"azure-ad-b2c","Azure AD B2C",[398],{"_path":175,"_dir":399,"_draft":400,"_partial":400,"_locale":401,"title":174,"description":402,"lead":403,"date":404,"image":405,"badge":407,"tags":409,"body":410,"_type":6274,"_id":6275,"_source":6276,"_file":6277,"_extension":6278},"posts",false,"","In this article, we will explore the latest C# 12 and .NET 8 features by applying them to the basic dotnet Web API template.","Enhanced weather forecast API","2023-12-19T00:00:00.000Z",{"src":406},"/images/weather_flag.webp",{"label":408},"Development",[326,239,236,213,384],{"type":411,"children":412,"toc":6269},"root",[413,420,427,443,482,487,499,504,539,554,563,576,647,669,686,706,715,721,726,731,775,784,797,1194,1222,1381,1393,1422,2593,2598,2754,2775,3296,3306,3523,3537,3741,3746,4009,4014,4025,4351,4360,4373,4605,4633,4638,4770,4775,4910,4923,5250,5262,5285,5592,5612,6024,6030,6035,6037,6199,6227,6249,6263],{"type":414,"tag":415,"props":416,"children":417},"element","p",{},[418],{"type":419,"value":402},"text",{"type":414,"tag":421,"props":422,"children":424},"h2",{"id":423},"getting-started-with-the-aspnet-core-web-api-template",[425],{"type":419,"value":426},"Getting started with the ASP.NET Core Web API template",{"type":414,"tag":415,"props":428,"children":429},{},[430,432,441],{"type":419,"value":431},"First, let's install the latest ",{"type":414,"tag":433,"props":434,"children":438},"a",{"href":435,"rel":436},"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",[437],"nofollow",[439],{"type":419,"value":440},".NET 8 SDK",{"type":419,"value":442},":",{"type":414,"tag":444,"props":445,"children":448},"pre",{"className":446,"code":447,"language":248,"meta":401,"style":401},"language-powershell shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","winget install --id Microsoft.DotNet.SDK.8\n",[449],{"type":414,"tag":450,"props":451,"children":452},"code",{"__ignoreMap":401},[453],{"type":414,"tag":454,"props":455,"children":458},"span",{"class":456,"line":457},"line",1,[459,465,471,476],{"type":414,"tag":454,"props":460,"children":462},{"style":461},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[463],{"type":419,"value":464},"winget install ",{"type":414,"tag":454,"props":466,"children":468},{"style":467},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[469],{"type":419,"value":470},"--",{"type":414,"tag":454,"props":472,"children":473},{"style":461},[474],{"type":419,"value":475},"id Microsoft.DotNet.SDK.",{"type":414,"tag":454,"props":477,"children":479},{"style":478},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[480],{"type":419,"value":481},"8\n",{"type":414,"tag":415,"props":483,"children":484},{},[485],{"type":419,"value":486},"We can list the available templates:",{"type":414,"tag":415,"props":488,"children":489},{},[490],{"type":414,"tag":491,"props":492,"children":498},"img",{"alt":493,"className":494,"src":497},"List of the available dotnet templates",[495,496],"rounded-lg","mx-auto","/posts/images/dontnet8_templates.webp",[],{"type":414,"tag":415,"props":500,"children":501},{},[502],{"type":419,"value":503},"Let's go for the basic ASP.NET Core Web API template but with the controllers:",{"type":414,"tag":444,"props":505,"children":507},{"className":446,"code":506,"language":248,"meta":401,"style":401},"dotnet new webapi --use-controllers -n WeatherApi\n",[508],{"type":414,"tag":450,"props":509,"children":510},{"__ignoreMap":401},[511],{"type":414,"tag":454,"props":512,"children":513},{"class":456,"line":457},[514,519,523,529,534],{"type":414,"tag":454,"props":515,"children":516},{"style":461},[517],{"type":419,"value":518},"dotnet new webapi ",{"type":414,"tag":454,"props":520,"children":521},{"style":467},[522],{"type":419,"value":470},{"type":414,"tag":454,"props":524,"children":526},{"style":525},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[527],{"type":419,"value":528},"use-controllers",{"type":414,"tag":454,"props":530,"children":531},{"style":467},[532],{"type":419,"value":533}," -",{"type":414,"tag":454,"props":535,"children":536},{"style":461},[537],{"type":419,"value":538},"n WeatherApi\n",{"type":414,"tag":540,"props":541,"children":543},"callout",{"icon":542},"i-heroicons-light-bulb",[544],{"type":414,"tag":415,"props":545,"children":546},{},[547,552],{"type":414,"tag":454,"props":548,"children":549},{},[550],{"type":419,"value":551},"Minimal APIs",{"type":419,"value":553}," are great too but having controllers is more suited to what I want to show in this article.",{"type":414,"tag":415,"props":555,"children":556},{},[557],{"type":414,"tag":491,"props":558,"children":562},{"alt":559,"className":560,"src":561},"Screenshot of the generated project in Rider",[495,496],"/posts/images/dontnet8_webapi_template.webp",[],{"type":414,"tag":415,"props":564,"children":565},{},[566,568,574],{"type":419,"value":567},"We can run the API and test the ",{"type":414,"tag":450,"props":569,"children":571},{"className":570},[],[572],{"type":419,"value":573},"GET /weatherforecast",{"type":419,"value":575}," endpoint using the generated request file:",{"type":414,"tag":444,"props":577,"children":580},{"className":578,"code":579,"language":212,"meta":401,"style":401},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","@WeatherApi_HostAddress = http://localhost:5103\n\nGET {{WeatherApi_HostAddress}}/weatherforecast/\nAccept: application/json\n",[581],{"type":414,"tag":450,"props":582,"children":583},{"__ignoreMap":401},[584,603,613,628],{"type":414,"tag":454,"props":585,"children":586},{"class":456,"line":457},[587,592,597],{"type":414,"tag":454,"props":588,"children":589},{"style":478},[590],{"type":419,"value":591},"@",{"type":414,"tag":454,"props":593,"children":594},{"style":461},[595],{"type":419,"value":596},"WeatherApi_HostAddress = ",{"type":414,"tag":454,"props":598,"children":600},{"style":599},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[601],{"type":419,"value":602},"http://localhost:5103\n",{"type":414,"tag":454,"props":604,"children":606},{"class":456,"line":605},2,[607],{"type":414,"tag":454,"props":608,"children":610},{"emptyLinePlaceholder":609},true,[611],{"type":419,"value":612},"\n",{"type":414,"tag":454,"props":614,"children":616},{"class":456,"line":615},3,[617,623],{"type":414,"tag":454,"props":618,"children":620},{"style":619},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[621],{"type":419,"value":622},"GET",{"type":414,"tag":454,"props":624,"children":625},{"style":461},[626],{"type":419,"value":627}," {{WeatherApi_HostAddress}}/weatherforecast/\n",{"type":414,"tag":454,"props":629,"children":631},{"class":456,"line":630},4,[632,638,642],{"type":414,"tag":454,"props":633,"children":635},{"style":634},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[636],{"type":419,"value":637},"Accept",{"type":414,"tag":454,"props":639,"children":640},{"style":478},[641],{"type":419,"value":442},{"type":414,"tag":454,"props":643,"children":644},{"style":599},[645],{"type":419,"value":646}," application/json\n",{"type":414,"tag":415,"props":648,"children":649},{},[650,652,658,660,667],{"type":419,"value":651},"This is included in the dotnet ",{"type":414,"tag":450,"props":653,"children":655},{"className":654},[],[656],{"type":419,"value":657},"webapi",{"type":419,"value":659}," template and is supported by Visual Studio, Rider, and vscode (using the ",{"type":414,"tag":433,"props":661,"children":664},{"href":662,"rel":663},"https://marketplace.visualstudio.com/items?itemName=humao.rest-client",[437],[665],{"type":419,"value":666},"REST Client extension",{"type":419,"value":668},")",{"type":414,"tag":540,"props":670,"children":671},{"icon":542},[672],{"type":414,"tag":415,"props":673,"children":674},{},[675,677,684],{"type":419,"value":676},"Read my article about ",{"type":414,"tag":433,"props":678,"children":681},{"href":679,"rel":680},"https://www.techwatching.dev/posts/http-clients",[437],[682],{"type":419,"value":683},"choosing an API Client",{"type":419,"value":685}," and why I prefer versioned HTTP files rather than GUI tools like Postman.",{"type":414,"tag":415,"props":687,"children":688},{},[689,691,704],{"type":419,"value":690},"If we put a breakpoint in the controller we can see one small ASP.NET 8 improvement concerning the debugging experience: ",{"type":414,"tag":433,"props":692,"children":695},{"href":693,"rel":694},"https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-8.0?view=aspnetcore-8.0#improved-debugging-experience",[437],[696,698],{"type":419,"value":697},"better debug summaries are displayed for types like ",{"type":414,"tag":450,"props":699,"children":701},{"className":700},[],[702],{"type":419,"value":703},"HttpContext",{"type":419,"value":705},".",{"type":414,"tag":415,"props":707,"children":708},{},[709],{"type":414,"tag":491,"props":710,"children":714},{"alt":711,"className":712,"src":713},"Debugging display of the HTTPContext class",[495,496],"/posts/images/dontnet8_httpcontext.webp",[],{"type":414,"tag":421,"props":716,"children":718},{"id":717},"enhancing-the-weather-forecast-api",[719],{"type":419,"value":720},"Enhancing the Weather Forecast API",{"type":414,"tag":415,"props":722,"children":723},{},[724],{"type":419,"value":725},"Currently, the template randomly generates weather forecasts in the controller. It would be nice to retrieve real weather data from a weather API.",{"type":414,"tag":415,"props":727,"children":728},{},[729],{"type":419,"value":730},"To do that we can:",{"type":414,"tag":732,"props":733,"children":734},"ul",{},[735,749,762],{"type":414,"tag":736,"props":737,"children":738},"li",{},[739,741,747],{"type":419,"value":740},"introduce an ",{"type":414,"tag":450,"props":742,"children":744},{"className":743},[],[745],{"type":419,"value":746},"IWeatherService",{"type":419,"value":748}," interface that contains a method to retrieve weather forecasts",{"type":414,"tag":736,"props":750,"children":751},{},[752,754,760],{"type":419,"value":753},"extract the current logic that generates the random weather forecasts in a ",{"type":414,"tag":450,"props":755,"children":757},{"className":756},[],[758],{"type":419,"value":759},"RandomWeatherService.cs",{"type":419,"value":761}," that implements this interface",{"type":414,"tag":736,"props":763,"children":764},{},[765,767,773],{"type":419,"value":766},"creates a new implementation ",{"type":414,"tag":450,"props":768,"children":770},{"className":769},[],[771],{"type":419,"value":772},"OpenWeatherService",{"type":419,"value":774}," of this interface that retrieves the weather data from the Open Weather Map API",{"type":414,"tag":415,"props":776,"children":777},{},[778],{"type":414,"tag":491,"props":779,"children":783},{"alt":780,"className":781,"src":782},"A diagram of the ASP.NETCore Weather API",[495,496],"/posts/images/dontnet8_webapi_diagram.webp",[],{"type":414,"tag":415,"props":785,"children":786},{},[787,789,795],{"type":419,"value":788},"The ",{"type":414,"tag":450,"props":790,"children":792},{"className":791},[],[793],{"type":419,"value":794},"WeatherForecastController",{"type":419,"value":796}," becomes:",{"type":414,"tag":444,"props":798,"children":801},{"className":799,"code":800,"language":326,"meta":401,"style":401},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[ApiController]\n[Route(\"[controller]\")]\npublic class WeatherForecastController : ControllerBase\n{\n    private readonly IWeatherService _weatherService;\n\n    public WeatherForecastController(IWeatherService weatherService)\n    {\n        _weatherService = weatherService;\n    }\n\n    [HttpGet(Name = \"GetWeatherForecast\")]\n    [ProducesResponseType(typeof(WeatherForecast), StatusCodes.Status200OK)]\n    public Task\u003CWeatherForecast[]> Get()\n    {\n        return _weatherService.GetWeatherForecasts();\n    }\n}\n",[802],{"type":414,"tag":450,"props":803,"children":804},{"__ignoreMap":401},[805,824,860,889,897,926,934,965,974,996,1005,1013,1059,1105,1142,1150,1177,1185],{"type":414,"tag":454,"props":806,"children":807},{"class":456,"line":457},[808,813,819],{"type":414,"tag":454,"props":809,"children":810},{"style":467},[811],{"type":419,"value":812},"[",{"type":414,"tag":454,"props":814,"children":816},{"style":815},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[817],{"type":419,"value":818},"ApiController",{"type":414,"tag":454,"props":820,"children":821},{"style":467},[822],{"type":419,"value":823},"]\n",{"type":414,"tag":454,"props":825,"children":826},{"class":456,"line":605},[827,831,836,841,846,851,855],{"type":414,"tag":454,"props":828,"children":829},{"style":467},[830],{"type":419,"value":812},{"type":414,"tag":454,"props":832,"children":833},{"style":815},[834],{"type":419,"value":835},"Route",{"type":414,"tag":454,"props":837,"children":838},{"style":467},[839],{"type":419,"value":840},"(",{"type":414,"tag":454,"props":842,"children":843},{"style":467},[844],{"type":419,"value":845},"\"",{"type":414,"tag":454,"props":847,"children":848},{"style":599},[849],{"type":419,"value":850},"[controller]",{"type":414,"tag":454,"props":852,"children":853},{"style":467},[854],{"type":419,"value":845},{"type":414,"tag":454,"props":856,"children":857},{"style":467},[858],{"type":419,"value":859},")]\n",{"type":414,"tag":454,"props":861,"children":862},{"class":456,"line":615},[863,869,874,879,884],{"type":414,"tag":454,"props":864,"children":866},{"style":865},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[867],{"type":419,"value":868},"public",{"type":414,"tag":454,"props":870,"children":871},{"style":815},[872],{"type":419,"value":873}," class",{"type":414,"tag":454,"props":875,"children":876},{"style":815},[877],{"type":419,"value":878}," WeatherForecastController",{"type":414,"tag":454,"props":880,"children":881},{"style":467},[882],{"type":419,"value":883}," :",{"type":414,"tag":454,"props":885,"children":886},{"style":815},[887],{"type":419,"value":888}," ControllerBase\n",{"type":414,"tag":454,"props":890,"children":891},{"class":456,"line":630},[892],{"type":414,"tag":454,"props":893,"children":894},{"style":467},[895],{"type":419,"value":896},"{\n",{"type":414,"tag":454,"props":898,"children":900},{"class":456,"line":899},5,[901,906,911,916,921],{"type":414,"tag":454,"props":902,"children":903},{"style":865},[904],{"type":419,"value":905},"    private",{"type":414,"tag":454,"props":907,"children":908},{"style":865},[909],{"type":419,"value":910}," readonly",{"type":414,"tag":454,"props":912,"children":913},{"style":815},[914],{"type":419,"value":915}," IWeatherService",{"type":414,"tag":454,"props":917,"children":918},{"style":815},[919],{"type":419,"value":920}," _weatherService",{"type":414,"tag":454,"props":922,"children":923},{"style":467},[924],{"type":419,"value":925},";\n",{"type":414,"tag":454,"props":927,"children":929},{"class":456,"line":928},6,[930],{"type":414,"tag":454,"props":931,"children":932},{"emptyLinePlaceholder":609},[933],{"type":419,"value":612},{"type":414,"tag":454,"props":935,"children":937},{"class":456,"line":936},7,[938,943,947,951,955,960],{"type":414,"tag":454,"props":939,"children":940},{"style":865},[941],{"type":419,"value":942},"    public",{"type":414,"tag":454,"props":944,"children":945},{"style":525},[946],{"type":419,"value":878},{"type":414,"tag":454,"props":948,"children":949},{"style":467},[950],{"type":419,"value":840},{"type":414,"tag":454,"props":952,"children":953},{"style":815},[954],{"type":419,"value":746},{"type":414,"tag":454,"props":956,"children":957},{"style":815},[958],{"type":419,"value":959}," weatherService",{"type":414,"tag":454,"props":961,"children":962},{"style":467},[963],{"type":419,"value":964},")\n",{"type":414,"tag":454,"props":966,"children":968},{"class":456,"line":967},8,[969],{"type":414,"tag":454,"props":970,"children":971},{"style":467},[972],{"type":419,"value":973},"    {\n",{"type":414,"tag":454,"props":975,"children":977},{"class":456,"line":976},9,[978,983,988,992],{"type":414,"tag":454,"props":979,"children":980},{"style":461},[981],{"type":419,"value":982},"        _weatherService ",{"type":414,"tag":454,"props":984,"children":985},{"style":467},[986],{"type":419,"value":987},"=",{"type":414,"tag":454,"props":989,"children":990},{"style":461},[991],{"type":419,"value":959},{"type":414,"tag":454,"props":993,"children":994},{"style":467},[995],{"type":419,"value":925},{"type":414,"tag":454,"props":997,"children":999},{"class":456,"line":998},10,[1000],{"type":414,"tag":454,"props":1001,"children":1002},{"style":467},[1003],{"type":419,"value":1004},"    }\n",{"type":414,"tag":454,"props":1006,"children":1008},{"class":456,"line":1007},11,[1009],{"type":414,"tag":454,"props":1010,"children":1011},{"emptyLinePlaceholder":609},[1012],{"type":419,"value":612},{"type":414,"tag":454,"props":1014,"children":1016},{"class":456,"line":1015},12,[1017,1022,1027,1031,1036,1041,1046,1051,1055],{"type":414,"tag":454,"props":1018,"children":1019},{"style":467},[1020],{"type":419,"value":1021},"    [",{"type":414,"tag":454,"props":1023,"children":1024},{"style":815},[1025],{"type":419,"value":1026},"HttpGet",{"type":414,"tag":454,"props":1028,"children":1029},{"style":467},[1030],{"type":419,"value":840},{"type":414,"tag":454,"props":1032,"children":1033},{"style":815},[1034],{"type":419,"value":1035},"Name",{"type":414,"tag":454,"props":1037,"children":1038},{"style":467},[1039],{"type":419,"value":1040}," =",{"type":414,"tag":454,"props":1042,"children":1043},{"style":467},[1044],{"type":419,"value":1045}," \"",{"type":414,"tag":454,"props":1047,"children":1048},{"style":599},[1049],{"type":419,"value":1050},"GetWeatherForecast",{"type":414,"tag":454,"props":1052,"children":1053},{"style":467},[1054],{"type":419,"value":845},{"type":414,"tag":454,"props":1056,"children":1057},{"style":467},[1058],{"type":419,"value":859},{"type":414,"tag":454,"props":1060,"children":1062},{"class":456,"line":1061},13,[1063,1067,1072,1077,1082,1087,1092,1096,1101],{"type":414,"tag":454,"props":1064,"children":1065},{"style":467},[1066],{"type":419,"value":1021},{"type":414,"tag":454,"props":1068,"children":1069},{"style":815},[1070],{"type":419,"value":1071},"ProducesResponseType",{"type":414,"tag":454,"props":1073,"children":1074},{"style":467},[1075],{"type":419,"value":1076},"(typeof(",{"type":414,"tag":454,"props":1078,"children":1079},{"style":815},[1080],{"type":419,"value":1081},"WeatherForecast",{"type":414,"tag":454,"props":1083,"children":1084},{"style":467},[1085],{"type":419,"value":1086},"),",{"type":414,"tag":454,"props":1088,"children":1089},{"style":461},[1090],{"type":419,"value":1091}," StatusCodes",{"type":414,"tag":454,"props":1093,"children":1094},{"style":467},[1095],{"type":419,"value":705},{"type":414,"tag":454,"props":1097,"children":1098},{"style":461},[1099],{"type":419,"value":1100},"Status200OK",{"type":414,"tag":454,"props":1102,"children":1103},{"style":467},[1104],{"type":419,"value":859},{"type":414,"tag":454,"props":1106,"children":1108},{"class":456,"line":1107},14,[1109,1113,1118,1123,1127,1132,1137],{"type":414,"tag":454,"props":1110,"children":1111},{"style":865},[1112],{"type":419,"value":942},{"type":414,"tag":454,"props":1114,"children":1115},{"style":815},[1116],{"type":419,"value":1117}," Task",{"type":414,"tag":454,"props":1119,"children":1120},{"style":467},[1121],{"type":419,"value":1122},"\u003C",{"type":414,"tag":454,"props":1124,"children":1125},{"style":815},[1126],{"type":419,"value":1081},{"type":414,"tag":454,"props":1128,"children":1129},{"style":467},[1130],{"type":419,"value":1131},"[]>",{"type":414,"tag":454,"props":1133,"children":1134},{"style":525},[1135],{"type":419,"value":1136}," Get",{"type":414,"tag":454,"props":1138,"children":1139},{"style":467},[1140],{"type":419,"value":1141},"()\n",{"type":414,"tag":454,"props":1143,"children":1145},{"class":456,"line":1144},15,[1146],{"type":414,"tag":454,"props":1147,"children":1148},{"style":467},[1149],{"type":419,"value":973},{"type":414,"tag":454,"props":1151,"children":1153},{"class":456,"line":1152},16,[1154,1159,1163,1167,1172],{"type":414,"tag":454,"props":1155,"children":1156},{"style":619},[1157],{"type":419,"value":1158},"        return",{"type":414,"tag":454,"props":1160,"children":1161},{"style":461},[1162],{"type":419,"value":920},{"type":414,"tag":454,"props":1164,"children":1165},{"style":467},[1166],{"type":419,"value":705},{"type":414,"tag":454,"props":1168,"children":1169},{"style":525},[1170],{"type":419,"value":1171},"GetWeatherForecasts",{"type":414,"tag":454,"props":1173,"children":1174},{"style":467},[1175],{"type":419,"value":1176},"();\n",{"type":414,"tag":454,"props":1178,"children":1180},{"class":456,"line":1179},17,[1181],{"type":414,"tag":454,"props":1182,"children":1183},{"style":467},[1184],{"type":419,"value":1004},{"type":414,"tag":454,"props":1186,"children":1188},{"class":456,"line":1187},18,[1189],{"type":414,"tag":454,"props":1190,"children":1191},{"style":467},[1192],{"type":419,"value":1193},"}\n",{"type":414,"tag":415,"props":1195,"children":1196},{},[1197,1199,1205,1207,1214,1216],{"type":419,"value":1198},"We can get rid of the ",{"type":414,"tag":450,"props":1200,"children":1202},{"className":1201},[],[1203],{"type":419,"value":1204},"typeof",{"type":419,"value":1206}," because there are now ",{"type":414,"tag":433,"props":1208,"children":1211},{"href":1209,"rel":1210},"https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-8.0?view=aspnetcore-8.0#support-for-generic-attributes",[437],[1212],{"type":419,"value":1213},"generic attributes for some common ASP.NET Core attributes",{"type":419,"value":1215}," like ",{"type":414,"tag":450,"props":1217,"children":1219},{"className":1218},[],[1220],{"type":419,"value":1221},"ProducesResponseType.",{"type":414,"tag":444,"props":1223,"children":1225},{"className":799,"code":1224,"language":326,"meta":401,"style":401},"    [HttpGet(Name = \"GetWeatherForecast\")]\n    [ProducesResponseType\u003CWeatherForecast>(StatusCodes.Status200OK)]\n    public Task\u003CWeatherForecast[]> Get()\n    {\n        return _weatherService.GetWeatherForecasts();\n    }\n",[1226],{"type":414,"tag":450,"props":1227,"children":1228},{"__ignoreMap":401},[1229,1268,1313,1344,1351,1374],{"type":414,"tag":454,"props":1230,"children":1231},{"class":456,"line":457},[1232,1236,1240,1244,1248,1252,1256,1260,1264],{"type":414,"tag":454,"props":1233,"children":1234},{"style":467},[1235],{"type":419,"value":1021},{"type":414,"tag":454,"props":1237,"children":1238},{"style":815},[1239],{"type":419,"value":1026},{"type":414,"tag":454,"props":1241,"children":1242},{"style":467},[1243],{"type":419,"value":840},{"type":414,"tag":454,"props":1245,"children":1246},{"style":815},[1247],{"type":419,"value":1035},{"type":414,"tag":454,"props":1249,"children":1250},{"style":467},[1251],{"type":419,"value":1040},{"type":414,"tag":454,"props":1253,"children":1254},{"style":467},[1255],{"type":419,"value":1045},{"type":414,"tag":454,"props":1257,"children":1258},{"style":599},[1259],{"type":419,"value":1050},{"type":414,"tag":454,"props":1261,"children":1262},{"style":467},[1263],{"type":419,"value":845},{"type":414,"tag":454,"props":1265,"children":1266},{"style":467},[1267],{"type":419,"value":859},{"type":414,"tag":454,"props":1269,"children":1270},{"class":456,"line":605},[1271,1275,1279,1283,1287,1292,1296,1301,1305,1309],{"type":414,"tag":454,"props":1272,"children":1273},{"style":467},[1274],{"type":419,"value":1021},{"type":414,"tag":454,"props":1276,"children":1277},{"style":815},[1278],{"type":419,"value":1071},{"type":414,"tag":454,"props":1280,"children":1281},{"style":461},[1282],{"type":419,"value":1122},{"type":414,"tag":454,"props":1284,"children":1285},{"style":815},[1286],{"type":419,"value":1081},{"type":414,"tag":454,"props":1288,"children":1289},{"style":461},[1290],{"type":419,"value":1291},">",{"type":414,"tag":454,"props":1293,"children":1294},{"style":467},[1295],{"type":419,"value":840},{"type":414,"tag":454,"props":1297,"children":1298},{"style":461},[1299],{"type":419,"value":1300},"StatusCodes",{"type":414,"tag":454,"props":1302,"children":1303},{"style":467},[1304],{"type":419,"value":705},{"type":414,"tag":454,"props":1306,"children":1307},{"style":461},[1308],{"type":419,"value":1100},{"type":414,"tag":454,"props":1310,"children":1311},{"style":467},[1312],{"type":419,"value":859},{"type":414,"tag":454,"props":1314,"children":1315},{"class":456,"line":615},[1316,1320,1324,1328,1332,1336,1340],{"type":414,"tag":454,"props":1317,"children":1318},{"style":865},[1319],{"type":419,"value":942},{"type":414,"tag":454,"props":1321,"children":1322},{"style":815},[1323],{"type":419,"value":1117},{"type":414,"tag":454,"props":1325,"children":1326},{"style":467},[1327],{"type":419,"value":1122},{"type":414,"tag":454,"props":1329,"children":1330},{"style":815},[1331],{"type":419,"value":1081},{"type":414,"tag":454,"props":1333,"children":1334},{"style":467},[1335],{"type":419,"value":1131},{"type":414,"tag":454,"props":1337,"children":1338},{"style":525},[1339],{"type":419,"value":1136},{"type":414,"tag":454,"props":1341,"children":1342},{"style":467},[1343],{"type":419,"value":1141},{"type":414,"tag":454,"props":1345,"children":1346},{"class":456,"line":630},[1347],{"type":414,"tag":454,"props":1348,"children":1349},{"style":467},[1350],{"type":419,"value":973},{"type":414,"tag":454,"props":1352,"children":1353},{"class":456,"line":899},[1354,1358,1362,1366,1370],{"type":414,"tag":454,"props":1355,"children":1356},{"style":619},[1357],{"type":419,"value":1158},{"type":414,"tag":454,"props":1359,"children":1360},{"style":461},[1361],{"type":419,"value":920},{"type":414,"tag":454,"props":1363,"children":1364},{"style":467},[1365],{"type":419,"value":705},{"type":414,"tag":454,"props":1367,"children":1368},{"style":525},[1369],{"type":419,"value":1171},{"type":414,"tag":454,"props":1371,"children":1372},{"style":467},[1373],{"type":419,"value":1176},{"type":414,"tag":454,"props":1375,"children":1376},{"class":456,"line":928},[1377],{"type":414,"tag":454,"props":1378,"children":1379},{"style":467},[1380],{"type":419,"value":1004},{"type":414,"tag":415,"props":1382,"children":1383},{},[1384,1386,1391],{"type":419,"value":1385},"There are now 2 implementations of the ",{"type":414,"tag":450,"props":1387,"children":1389},{"className":1388},[],[1390],{"type":419,"value":746},{"type":419,"value":1392}," interface:",{"type":414,"tag":732,"props":1394,"children":1395},{},[1396,1407],{"type":414,"tag":736,"props":1397,"children":1398},{},[1399,1405],{"type":414,"tag":450,"props":1400,"children":1402},{"className":1401},[],[1403],{"type":419,"value":1404},"RandomWeatherService",{"type":419,"value":1406}," that contains the code that previously was in the controller",{"type":414,"tag":736,"props":1408,"children":1409},{},[1410,1415,1417],{"type":414,"tag":450,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":419,"value":772},{"type":419,"value":1416}," that makes a call to the Open Weather Map API to retrieve the weather forecasts and then maps the obtained data to a list of ",{"type":414,"tag":450,"props":1418,"children":1420},{"className":1419},[],[1421],{"type":419,"value":1081},{"type":414,"tag":444,"props":1423,"children":1425},{"className":799,"code":1424,"language":326,"meta":401,"style":401},"public class OpenWeatherService : IWeatherService\n{\n    private readonly IOpenWeatherMapApi _openWeatherMapApi;\n    private static readonly (double Latitude, double Longitude) BordeauxCoordinates = (44.837789, -0.57918);\n\n    public OpenWeatherService(IOpenWeatherMapApi openWeatherMapApi)\n    {\n        _openWeatherMapApi = openWeatherMapApi;\n    }\n\n    public async Task\u003CWeatherForecast[]> GetWeatherForecasts()\n    {\n        var weatherApiResponse = await _openWeatherMapApi.GetWeatherForecast(BordeauxCoordinates.Latitude, BordeauxCoordinates.Longitude);\n        \n        var computeWeatherSummary = (double temperature) =>\n            temperature switch\n            {\n                \u003C 0 => \"Freezing\",\n                >= 0 and \u003C 5 => \"Bracing\",\n                >= 5 and \u003C 12 => \"Chilly\",\n                >= 12 and \u003C 18 => \"Cool\",\n                >= 18 and \u003C 24 => \"Mild\",\n                >= 24 and \u003C 30 => \"Warm\",\n                >= 30 and \u003C 35 => \"Balmy\",\n                >= 35 and \u003C 40 => \"Hot\",\n                >= 40 and \u003C 45 => \"Sweltering\",\n                >= 45 => \"Scorching\",\n                _ => \"Warm\"\n            };\n        return weatherApiResponse.List\n            .Select(x =>\n                new WeatherForecast\n                {\n                    Date = DateOnly.FromDateTime(DateTimeOffset.FromUnixTimeSeconds(x.Dt).Date),\n                    TemperatureC = Convert.ToInt32(x.Main.Temp),\n                    Summary = computeWeatherSummary(x.Main.Temp)\n                })\n            .ToArray();\n    }\n}\n",[1426],{"type":414,"tag":450,"props":1427,"children":1428},{"__ignoreMap":401},[1429,1454,1461,1486,1568,1575,1604,1611,1631,1638,1645,1682,1689,1762,1770,1804,1817,1825,1861,1910,1956,2002,2048,2094,2140,2186,2232,2265,2292,2301,2322,2349,2363,2372,2449,2506,2551,2560,2577,2585],{"type":414,"tag":454,"props":1430,"children":1431},{"class":456,"line":457},[1432,1436,1440,1445,1449],{"type":414,"tag":454,"props":1433,"children":1434},{"style":865},[1435],{"type":419,"value":868},{"type":414,"tag":454,"props":1437,"children":1438},{"style":815},[1439],{"type":419,"value":873},{"type":414,"tag":454,"props":1441,"children":1442},{"style":815},[1443],{"type":419,"value":1444}," OpenWeatherService",{"type":414,"tag":454,"props":1446,"children":1447},{"style":467},[1448],{"type":419,"value":883},{"type":414,"tag":454,"props":1450,"children":1451},{"style":815},[1452],{"type":419,"value":1453}," IWeatherService\n",{"type":414,"tag":454,"props":1455,"children":1456},{"class":456,"line":605},[1457],{"type":414,"tag":454,"props":1458,"children":1459},{"style":467},[1460],{"type":419,"value":896},{"type":414,"tag":454,"props":1462,"children":1463},{"class":456,"line":615},[1464,1468,1472,1477,1482],{"type":414,"tag":454,"props":1465,"children":1466},{"style":865},[1467],{"type":419,"value":905},{"type":414,"tag":454,"props":1469,"children":1470},{"style":865},[1471],{"type":419,"value":910},{"type":414,"tag":454,"props":1473,"children":1474},{"style":815},[1475],{"type":419,"value":1476}," IOpenWeatherMapApi",{"type":414,"tag":454,"props":1478,"children":1479},{"style":815},[1480],{"type":419,"value":1481}," _openWeatherMapApi",{"type":414,"tag":454,"props":1483,"children":1484},{"style":467},[1485],{"type":419,"value":925},{"type":414,"tag":454,"props":1487,"children":1488},{"class":456,"line":630},[1489,1493,1498,1502,1507,1512,1517,1522,1527,1531,1536,1540,1545,1550,1554,1558,1563],{"type":414,"tag":454,"props":1490,"children":1491},{"style":865},[1492],{"type":419,"value":905},{"type":414,"tag":454,"props":1494,"children":1495},{"style":865},[1496],{"type":419,"value":1497}," static",{"type":414,"tag":454,"props":1499,"children":1500},{"style":865},[1501],{"type":419,"value":910},{"type":414,"tag":454,"props":1503,"children":1504},{"style":467},[1505],{"type":419,"value":1506}," (double",{"type":414,"tag":454,"props":1508,"children":1509},{"style":815},[1510],{"type":419,"value":1511}," Latitude",{"type":414,"tag":454,"props":1513,"children":1514},{"style":467},[1515],{"type":419,"value":1516},",",{"type":414,"tag":454,"props":1518,"children":1519},{"style":467},[1520],{"type":419,"value":1521}," double",{"type":414,"tag":454,"props":1523,"children":1524},{"style":815},[1525],{"type":419,"value":1526}," Longitude",{"type":414,"tag":454,"props":1528,"children":1529},{"style":467},[1530],{"type":419,"value":668},{"type":414,"tag":454,"props":1532,"children":1533},{"style":815},[1534],{"type":419,"value":1535}," BordeauxCoordinates",{"type":414,"tag":454,"props":1537,"children":1538},{"style":467},[1539],{"type":419,"value":1040},{"type":414,"tag":454,"props":1541,"children":1542},{"style":467},[1543],{"type":419,"value":1544}," (",{"type":414,"tag":454,"props":1546,"children":1547},{"style":478},[1548],{"type":419,"value":1549},"44.837789",{"type":414,"tag":454,"props":1551,"children":1552},{"style":467},[1553],{"type":419,"value":1516},{"type":414,"tag":454,"props":1555,"children":1556},{"style":467},[1557],{"type":419,"value":533},{"type":414,"tag":454,"props":1559,"children":1560},{"style":478},[1561],{"type":419,"value":1562},"0.57918",{"type":414,"tag":454,"props":1564,"children":1565},{"style":467},[1566],{"type":419,"value":1567},");\n",{"type":414,"tag":454,"props":1569,"children":1570},{"class":456,"line":899},[1571],{"type":414,"tag":454,"props":1572,"children":1573},{"emptyLinePlaceholder":609},[1574],{"type":419,"value":612},{"type":414,"tag":454,"props":1576,"children":1577},{"class":456,"line":928},[1578,1582,1586,1590,1595,1600],{"type":414,"tag":454,"props":1579,"children":1580},{"style":865},[1581],{"type":419,"value":942},{"type":414,"tag":454,"props":1583,"children":1584},{"style":525},[1585],{"type":419,"value":1444},{"type":414,"tag":454,"props":1587,"children":1588},{"style":467},[1589],{"type":419,"value":840},{"type":414,"tag":454,"props":1591,"children":1592},{"style":815},[1593],{"type":419,"value":1594},"IOpenWeatherMapApi",{"type":414,"tag":454,"props":1596,"children":1597},{"style":815},[1598],{"type":419,"value":1599}," openWeatherMapApi",{"type":414,"tag":454,"props":1601,"children":1602},{"style":467},[1603],{"type":419,"value":964},{"type":414,"tag":454,"props":1605,"children":1606},{"class":456,"line":936},[1607],{"type":414,"tag":454,"props":1608,"children":1609},{"style":467},[1610],{"type":419,"value":973},{"type":414,"tag":454,"props":1612,"children":1613},{"class":456,"line":967},[1614,1619,1623,1627],{"type":414,"tag":454,"props":1615,"children":1616},{"style":461},[1617],{"type":419,"value":1618},"        _openWeatherMapApi ",{"type":414,"tag":454,"props":1620,"children":1621},{"style":467},[1622],{"type":419,"value":987},{"type":414,"tag":454,"props":1624,"children":1625},{"style":461},[1626],{"type":419,"value":1599},{"type":414,"tag":454,"props":1628,"children":1629},{"style":467},[1630],{"type":419,"value":925},{"type":414,"tag":454,"props":1632,"children":1633},{"class":456,"line":976},[1634],{"type":414,"tag":454,"props":1635,"children":1636},{"style":467},[1637],{"type":419,"value":1004},{"type":414,"tag":454,"props":1639,"children":1640},{"class":456,"line":998},[1641],{"type":414,"tag":454,"props":1642,"children":1643},{"emptyLinePlaceholder":609},[1644],{"type":419,"value":612},{"type":414,"tag":454,"props":1646,"children":1647},{"class":456,"line":1007},[1648,1652,1657,1661,1665,1669,1673,1678],{"type":414,"tag":454,"props":1649,"children":1650},{"style":865},[1651],{"type":419,"value":942},{"type":414,"tag":454,"props":1653,"children":1654},{"style":865},[1655],{"type":419,"value":1656}," async",{"type":414,"tag":454,"props":1658,"children":1659},{"style":815},[1660],{"type":419,"value":1117},{"type":414,"tag":454,"props":1662,"children":1663},{"style":467},[1664],{"type":419,"value":1122},{"type":414,"tag":454,"props":1666,"children":1667},{"style":815},[1668],{"type":419,"value":1081},{"type":414,"tag":454,"props":1670,"children":1671},{"style":467},[1672],{"type":419,"value":1131},{"type":414,"tag":454,"props":1674,"children":1675},{"style":525},[1676],{"type":419,"value":1677}," GetWeatherForecasts",{"type":414,"tag":454,"props":1679,"children":1680},{"style":467},[1681],{"type":419,"value":1141},{"type":414,"tag":454,"props":1683,"children":1684},{"class":456,"line":1015},[1685],{"type":414,"tag":454,"props":1686,"children":1687},{"style":467},[1688],{"type":419,"value":973},{"type":414,"tag":454,"props":1690,"children":1691},{"class":456,"line":1061},[1692,1697,1702,1706,1711,1715,1719,1723,1727,1732,1736,1741,1745,1749,1753,1758],{"type":414,"tag":454,"props":1693,"children":1694},{"style":815},[1695],{"type":419,"value":1696},"        var",{"type":414,"tag":454,"props":1698,"children":1699},{"style":815},[1700],{"type":419,"value":1701}," weatherApiResponse",{"type":414,"tag":454,"props":1703,"children":1704},{"style":467},[1705],{"type":419,"value":1040},{"type":414,"tag":454,"props":1707,"children":1708},{"style":467},[1709],{"type":419,"value":1710}," await",{"type":414,"tag":454,"props":1712,"children":1713},{"style":461},[1714],{"type":419,"value":1481},{"type":414,"tag":454,"props":1716,"children":1717},{"style":467},[1718],{"type":419,"value":705},{"type":414,"tag":454,"props":1720,"children":1721},{"style":525},[1722],{"type":419,"value":1050},{"type":414,"tag":454,"props":1724,"children":1725},{"style":467},[1726],{"type":419,"value":840},{"type":414,"tag":454,"props":1728,"children":1729},{"style":461},[1730],{"type":419,"value":1731},"BordeauxCoordinates",{"type":414,"tag":454,"props":1733,"children":1734},{"style":467},[1735],{"type":419,"value":705},{"type":414,"tag":454,"props":1737,"children":1738},{"style":461},[1739],{"type":419,"value":1740},"Latitude",{"type":414,"tag":454,"props":1742,"children":1743},{"style":467},[1744],{"type":419,"value":1516},{"type":414,"tag":454,"props":1746,"children":1747},{"style":461},[1748],{"type":419,"value":1535},{"type":414,"tag":454,"props":1750,"children":1751},{"style":467},[1752],{"type":419,"value":705},{"type":414,"tag":454,"props":1754,"children":1755},{"style":461},[1756],{"type":419,"value":1757},"Longitude",{"type":414,"tag":454,"props":1759,"children":1760},{"style":467},[1761],{"type":419,"value":1567},{"type":414,"tag":454,"props":1763,"children":1764},{"class":456,"line":1107},[1765],{"type":414,"tag":454,"props":1766,"children":1767},{"style":461},[1768],{"type":419,"value":1769},"        \n",{"type":414,"tag":454,"props":1771,"children":1772},{"class":456,"line":1144},[1773,1777,1782,1786,1790,1795,1799],{"type":414,"tag":454,"props":1774,"children":1775},{"style":815},[1776],{"type":419,"value":1696},{"type":414,"tag":454,"props":1778,"children":1779},{"style":815},[1780],{"type":419,"value":1781}," computeWeatherSummary",{"type":414,"tag":454,"props":1783,"children":1784},{"style":467},[1785],{"type":419,"value":1040},{"type":414,"tag":454,"props":1787,"children":1788},{"style":467},[1789],{"type":419,"value":1506},{"type":414,"tag":454,"props":1791,"children":1792},{"style":815},[1793],{"type":419,"value":1794}," temperature",{"type":414,"tag":454,"props":1796,"children":1797},{"style":467},[1798],{"type":419,"value":668},{"type":414,"tag":454,"props":1800,"children":1801},{"style":467},[1802],{"type":419,"value":1803}," =>\n",{"type":414,"tag":454,"props":1805,"children":1806},{"class":456,"line":1152},[1807,1812],{"type":414,"tag":454,"props":1808,"children":1809},{"style":461},[1810],{"type":419,"value":1811},"            temperature ",{"type":414,"tag":454,"props":1813,"children":1814},{"style":619},[1815],{"type":419,"value":1816},"switch\n",{"type":414,"tag":454,"props":1818,"children":1819},{"class":456,"line":1179},[1820],{"type":414,"tag":454,"props":1821,"children":1822},{"style":467},[1823],{"type":419,"value":1824},"            {\n",{"type":414,"tag":454,"props":1826,"children":1827},{"class":456,"line":1187},[1828,1833,1838,1843,1847,1852,1856],{"type":414,"tag":454,"props":1829,"children":1830},{"style":467},[1831],{"type":419,"value":1832},"                \u003C",{"type":414,"tag":454,"props":1834,"children":1835},{"style":478},[1836],{"type":419,"value":1837}," 0",{"type":414,"tag":454,"props":1839,"children":1840},{"style":467},[1841],{"type":419,"value":1842}," =>",{"type":414,"tag":454,"props":1844,"children":1845},{"style":467},[1846],{"type":419,"value":1045},{"type":414,"tag":454,"props":1848,"children":1849},{"style":599},[1850],{"type":419,"value":1851},"Freezing",{"type":414,"tag":454,"props":1853,"children":1854},{"style":467},[1855],{"type":419,"value":845},{"type":414,"tag":454,"props":1857,"children":1858},{"style":467},[1859],{"type":419,"value":1860},",\n",{"type":414,"tag":454,"props":1862,"children":1864},{"class":456,"line":1863},19,[1865,1870,1874,1879,1884,1889,1893,1897,1902,1906],{"type":414,"tag":454,"props":1866,"children":1867},{"style":467},[1868],{"type":419,"value":1869},"                >=",{"type":414,"tag":454,"props":1871,"children":1872},{"style":478},[1873],{"type":419,"value":1837},{"type":414,"tag":454,"props":1875,"children":1876},{"style":467},[1877],{"type":419,"value":1878}," and",{"type":414,"tag":454,"props":1880,"children":1881},{"style":467},[1882],{"type":419,"value":1883}," \u003C",{"type":414,"tag":454,"props":1885,"children":1886},{"style":478},[1887],{"type":419,"value":1888}," 5",{"type":414,"tag":454,"props":1890,"children":1891},{"style":467},[1892],{"type":419,"value":1842},{"type":414,"tag":454,"props":1894,"children":1895},{"style":467},[1896],{"type":419,"value":1045},{"type":414,"tag":454,"props":1898,"children":1899},{"style":599},[1900],{"type":419,"value":1901},"Bracing",{"type":414,"tag":454,"props":1903,"children":1904},{"style":467},[1905],{"type":419,"value":845},{"type":414,"tag":454,"props":1907,"children":1908},{"style":467},[1909],{"type":419,"value":1860},{"type":414,"tag":454,"props":1911,"children":1913},{"class":456,"line":1912},20,[1914,1918,1922,1926,1930,1935,1939,1943,1948,1952],{"type":414,"tag":454,"props":1915,"children":1916},{"style":467},[1917],{"type":419,"value":1869},{"type":414,"tag":454,"props":1919,"children":1920},{"style":478},[1921],{"type":419,"value":1888},{"type":414,"tag":454,"props":1923,"children":1924},{"style":467},[1925],{"type":419,"value":1878},{"type":414,"tag":454,"props":1927,"children":1928},{"style":467},[1929],{"type":419,"value":1883},{"type":414,"tag":454,"props":1931,"children":1932},{"style":478},[1933],{"type":419,"value":1934}," 12",{"type":414,"tag":454,"props":1936,"children":1937},{"style":467},[1938],{"type":419,"value":1842},{"type":414,"tag":454,"props":1940,"children":1941},{"style":467},[1942],{"type":419,"value":1045},{"type":414,"tag":454,"props":1944,"children":1945},{"style":599},[1946],{"type":419,"value":1947},"Chilly",{"type":414,"tag":454,"props":1949,"children":1950},{"style":467},[1951],{"type":419,"value":845},{"type":414,"tag":454,"props":1953,"children":1954},{"style":467},[1955],{"type":419,"value":1860},{"type":414,"tag":454,"props":1957,"children":1959},{"class":456,"line":1958},21,[1960,1964,1968,1972,1976,1981,1985,1989,1994,1998],{"type":414,"tag":454,"props":1961,"children":1962},{"style":467},[1963],{"type":419,"value":1869},{"type":414,"tag":454,"props":1965,"children":1966},{"style":478},[1967],{"type":419,"value":1934},{"type":414,"tag":454,"props":1969,"children":1970},{"style":467},[1971],{"type":419,"value":1878},{"type":414,"tag":454,"props":1973,"children":1974},{"style":467},[1975],{"type":419,"value":1883},{"type":414,"tag":454,"props":1977,"children":1978},{"style":478},[1979],{"type":419,"value":1980}," 18",{"type":414,"tag":454,"props":1982,"children":1983},{"style":467},[1984],{"type":419,"value":1842},{"type":414,"tag":454,"props":1986,"children":1987},{"style":467},[1988],{"type":419,"value":1045},{"type":414,"tag":454,"props":1990,"children":1991},{"style":599},[1992],{"type":419,"value":1993},"Cool",{"type":414,"tag":454,"props":1995,"children":1996},{"style":467},[1997],{"type":419,"value":845},{"type":414,"tag":454,"props":1999,"children":2000},{"style":467},[2001],{"type":419,"value":1860},{"type":414,"tag":454,"props":2003,"children":2005},{"class":456,"line":2004},22,[2006,2010,2014,2018,2022,2027,2031,2035,2040,2044],{"type":414,"tag":454,"props":2007,"children":2008},{"style":467},[2009],{"type":419,"value":1869},{"type":414,"tag":454,"props":2011,"children":2012},{"style":478},[2013],{"type":419,"value":1980},{"type":414,"tag":454,"props":2015,"children":2016},{"style":467},[2017],{"type":419,"value":1878},{"type":414,"tag":454,"props":2019,"children":2020},{"style":467},[2021],{"type":419,"value":1883},{"type":414,"tag":454,"props":2023,"children":2024},{"style":478},[2025],{"type":419,"value":2026}," 24",{"type":414,"tag":454,"props":2028,"children":2029},{"style":467},[2030],{"type":419,"value":1842},{"type":414,"tag":454,"props":2032,"children":2033},{"style":467},[2034],{"type":419,"value":1045},{"type":414,"tag":454,"props":2036,"children":2037},{"style":599},[2038],{"type":419,"value":2039},"Mild",{"type":414,"tag":454,"props":2041,"children":2042},{"style":467},[2043],{"type":419,"value":845},{"type":414,"tag":454,"props":2045,"children":2046},{"style":467},[2047],{"type":419,"value":1860},{"type":414,"tag":454,"props":2049,"children":2051},{"class":456,"line":2050},23,[2052,2056,2060,2064,2068,2073,2077,2081,2086,2090],{"type":414,"tag":454,"props":2053,"children":2054},{"style":467},[2055],{"type":419,"value":1869},{"type":414,"tag":454,"props":2057,"children":2058},{"style":478},[2059],{"type":419,"value":2026},{"type":414,"tag":454,"props":2061,"children":2062},{"style":467},[2063],{"type":419,"value":1878},{"type":414,"tag":454,"props":2065,"children":2066},{"style":467},[2067],{"type":419,"value":1883},{"type":414,"tag":454,"props":2069,"children":2070},{"style":478},[2071],{"type":419,"value":2072}," 30",{"type":414,"tag":454,"props":2074,"children":2075},{"style":467},[2076],{"type":419,"value":1842},{"type":414,"tag":454,"props":2078,"children":2079},{"style":467},[2080],{"type":419,"value":1045},{"type":414,"tag":454,"props":2082,"children":2083},{"style":599},[2084],{"type":419,"value":2085},"Warm",{"type":414,"tag":454,"props":2087,"children":2088},{"style":467},[2089],{"type":419,"value":845},{"type":414,"tag":454,"props":2091,"children":2092},{"style":467},[2093],{"type":419,"value":1860},{"type":414,"tag":454,"props":2095,"children":2097},{"class":456,"line":2096},24,[2098,2102,2106,2110,2114,2119,2123,2127,2132,2136],{"type":414,"tag":454,"props":2099,"children":2100},{"style":467},[2101],{"type":419,"value":1869},{"type":414,"tag":454,"props":2103,"children":2104},{"style":478},[2105],{"type":419,"value":2072},{"type":414,"tag":454,"props":2107,"children":2108},{"style":467},[2109],{"type":419,"value":1878},{"type":414,"tag":454,"props":2111,"children":2112},{"style":467},[2113],{"type":419,"value":1883},{"type":414,"tag":454,"props":2115,"children":2116},{"style":478},[2117],{"type":419,"value":2118}," 35",{"type":414,"tag":454,"props":2120,"children":2121},{"style":467},[2122],{"type":419,"value":1842},{"type":414,"tag":454,"props":2124,"children":2125},{"style":467},[2126],{"type":419,"value":1045},{"type":414,"tag":454,"props":2128,"children":2129},{"style":599},[2130],{"type":419,"value":2131},"Balmy",{"type":414,"tag":454,"props":2133,"children":2134},{"style":467},[2135],{"type":419,"value":845},{"type":414,"tag":454,"props":2137,"children":2138},{"style":467},[2139],{"type":419,"value":1860},{"type":414,"tag":454,"props":2141,"children":2143},{"class":456,"line":2142},25,[2144,2148,2152,2156,2160,2165,2169,2173,2178,2182],{"type":414,"tag":454,"props":2145,"children":2146},{"style":467},[2147],{"type":419,"value":1869},{"type":414,"tag":454,"props":2149,"children":2150},{"style":478},[2151],{"type":419,"value":2118},{"type":414,"tag":454,"props":2153,"children":2154},{"style":467},[2155],{"type":419,"value":1878},{"type":414,"tag":454,"props":2157,"children":2158},{"style":467},[2159],{"type":419,"value":1883},{"type":414,"tag":454,"props":2161,"children":2162},{"style":478},[2163],{"type":419,"value":2164}," 40",{"type":414,"tag":454,"props":2166,"children":2167},{"style":467},[2168],{"type":419,"value":1842},{"type":414,"tag":454,"props":2170,"children":2171},{"style":467},[2172],{"type":419,"value":1045},{"type":414,"tag":454,"props":2174,"children":2175},{"style":599},[2176],{"type":419,"value":2177},"Hot",{"type":414,"tag":454,"props":2179,"children":2180},{"style":467},[2181],{"type":419,"value":845},{"type":414,"tag":454,"props":2183,"children":2184},{"style":467},[2185],{"type":419,"value":1860},{"type":414,"tag":454,"props":2187,"children":2189},{"class":456,"line":2188},26,[2190,2194,2198,2202,2206,2211,2215,2219,2224,2228],{"type":414,"tag":454,"props":2191,"children":2192},{"style":467},[2193],{"type":419,"value":1869},{"type":414,"tag":454,"props":2195,"children":2196},{"style":478},[2197],{"type":419,"value":2164},{"type":414,"tag":454,"props":2199,"children":2200},{"style":467},[2201],{"type":419,"value":1878},{"type":414,"tag":454,"props":2203,"children":2204},{"style":467},[2205],{"type":419,"value":1883},{"type":414,"tag":454,"props":2207,"children":2208},{"style":478},[2209],{"type":419,"value":2210}," 45",{"type":414,"tag":454,"props":2212,"children":2213},{"style":467},[2214],{"type":419,"value":1842},{"type":414,"tag":454,"props":2216,"children":2217},{"style":467},[2218],{"type":419,"value":1045},{"type":414,"tag":454,"props":2220,"children":2221},{"style":599},[2222],{"type":419,"value":2223},"Sweltering",{"type":414,"tag":454,"props":2225,"children":2226},{"style":467},[2227],{"type":419,"value":845},{"type":414,"tag":454,"props":2229,"children":2230},{"style":467},[2231],{"type":419,"value":1860},{"type":414,"tag":454,"props":2233,"children":2235},{"class":456,"line":2234},27,[2236,2240,2244,2248,2252,2257,2261],{"type":414,"tag":454,"props":2237,"children":2238},{"style":467},[2239],{"type":419,"value":1869},{"type":414,"tag":454,"props":2241,"children":2242},{"style":478},[2243],{"type":419,"value":2210},{"type":414,"tag":454,"props":2245,"children":2246},{"style":467},[2247],{"type":419,"value":1842},{"type":414,"tag":454,"props":2249,"children":2250},{"style":467},[2251],{"type":419,"value":1045},{"type":414,"tag":454,"props":2253,"children":2254},{"style":599},[2255],{"type":419,"value":2256},"Scorching",{"type":414,"tag":454,"props":2258,"children":2259},{"style":467},[2260],{"type":419,"value":845},{"type":414,"tag":454,"props":2262,"children":2263},{"style":467},[2264],{"type":419,"value":1860},{"type":414,"tag":454,"props":2266,"children":2268},{"class":456,"line":2267},28,[2269,2274,2279,2283,2287],{"type":414,"tag":454,"props":2270,"children":2271},{"style":461},[2272],{"type":419,"value":2273},"                _ ",{"type":414,"tag":454,"props":2275,"children":2276},{"style":467},[2277],{"type":419,"value":2278},"=>",{"type":414,"tag":454,"props":2280,"children":2281},{"style":467},[2282],{"type":419,"value":1045},{"type":414,"tag":454,"props":2284,"children":2285},{"style":599},[2286],{"type":419,"value":2085},{"type":414,"tag":454,"props":2288,"children":2289},{"style":467},[2290],{"type":419,"value":2291},"\"\n",{"type":414,"tag":454,"props":2293,"children":2295},{"class":456,"line":2294},29,[2296],{"type":414,"tag":454,"props":2297,"children":2298},{"style":467},[2299],{"type":419,"value":2300},"            };\n",{"type":414,"tag":454,"props":2302,"children":2304},{"class":456,"line":2303},30,[2305,2309,2313,2317],{"type":414,"tag":454,"props":2306,"children":2307},{"style":619},[2308],{"type":419,"value":1158},{"type":414,"tag":454,"props":2310,"children":2311},{"style":461},[2312],{"type":419,"value":1701},{"type":414,"tag":454,"props":2314,"children":2315},{"style":467},[2316],{"type":419,"value":705},{"type":414,"tag":454,"props":2318,"children":2319},{"style":461},[2320],{"type":419,"value":2321},"List\n",{"type":414,"tag":454,"props":2323,"children":2325},{"class":456,"line":2324},31,[2326,2331,2336,2340,2345],{"type":414,"tag":454,"props":2327,"children":2328},{"style":467},[2329],{"type":419,"value":2330},"            .",{"type":414,"tag":454,"props":2332,"children":2333},{"style":525},[2334],{"type":419,"value":2335},"Select",{"type":414,"tag":454,"props":2337,"children":2338},{"style":467},[2339],{"type":419,"value":840},{"type":414,"tag":454,"props":2341,"children":2342},{"style":815},[2343],{"type":419,"value":2344},"x",{"type":414,"tag":454,"props":2346,"children":2347},{"style":467},[2348],{"type":419,"value":1803},{"type":414,"tag":454,"props":2350,"children":2352},{"class":456,"line":2351},32,[2353,2358],{"type":414,"tag":454,"props":2354,"children":2355},{"style":467},[2356],{"type":419,"value":2357},"                new",{"type":414,"tag":454,"props":2359,"children":2360},{"style":815},[2361],{"type":419,"value":2362}," WeatherForecast\n",{"type":414,"tag":454,"props":2364,"children":2366},{"class":456,"line":2365},33,[2367],{"type":414,"tag":454,"props":2368,"children":2369},{"style":467},[2370],{"type":419,"value":2371},"                {\n",{"type":414,"tag":454,"props":2373,"children":2375},{"class":456,"line":2374},34,[2376,2381,2385,2390,2394,2399,2403,2408,2412,2417,2421,2425,2429,2434,2439,2444],{"type":414,"tag":454,"props":2377,"children":2378},{"style":461},[2379],{"type":419,"value":2380},"                    Date ",{"type":414,"tag":454,"props":2382,"children":2383},{"style":467},[2384],{"type":419,"value":987},{"type":414,"tag":454,"props":2386,"children":2387},{"style":461},[2388],{"type":419,"value":2389}," DateOnly",{"type":414,"tag":454,"props":2391,"children":2392},{"style":467},[2393],{"type":419,"value":705},{"type":414,"tag":454,"props":2395,"children":2396},{"style":525},[2397],{"type":419,"value":2398},"FromDateTime",{"type":414,"tag":454,"props":2400,"children":2401},{"style":467},[2402],{"type":419,"value":840},{"type":414,"tag":454,"props":2404,"children":2405},{"style":461},[2406],{"type":419,"value":2407},"DateTimeOffset",{"type":414,"tag":454,"props":2409,"children":2410},{"style":467},[2411],{"type":419,"value":705},{"type":414,"tag":454,"props":2413,"children":2414},{"style":525},[2415],{"type":419,"value":2416},"FromUnixTimeSeconds",{"type":414,"tag":454,"props":2418,"children":2419},{"style":467},[2420],{"type":419,"value":840},{"type":414,"tag":454,"props":2422,"children":2423},{"style":461},[2424],{"type":419,"value":2344},{"type":414,"tag":454,"props":2426,"children":2427},{"style":467},[2428],{"type":419,"value":705},{"type":414,"tag":454,"props":2430,"children":2431},{"style":461},[2432],{"type":419,"value":2433},"Dt",{"type":414,"tag":454,"props":2435,"children":2436},{"style":467},[2437],{"type":419,"value":2438},").",{"type":414,"tag":454,"props":2440,"children":2441},{"style":461},[2442],{"type":419,"value":2443},"Date",{"type":414,"tag":454,"props":2445,"children":2446},{"style":467},[2447],{"type":419,"value":2448},"),\n",{"type":414,"tag":454,"props":2450,"children":2452},{"class":456,"line":2451},35,[2453,2458,2462,2467,2471,2476,2480,2484,2488,2493,2497,2502],{"type":414,"tag":454,"props":2454,"children":2455},{"style":461},[2456],{"type":419,"value":2457},"                    TemperatureC ",{"type":414,"tag":454,"props":2459,"children":2460},{"style":467},[2461],{"type":419,"value":987},{"type":414,"tag":454,"props":2463,"children":2464},{"style":461},[2465],{"type":419,"value":2466}," Convert",{"type":414,"tag":454,"props":2468,"children":2469},{"style":467},[2470],{"type":419,"value":705},{"type":414,"tag":454,"props":2472,"children":2473},{"style":525},[2474],{"type":419,"value":2475},"ToInt32",{"type":414,"tag":454,"props":2477,"children":2478},{"style":467},[2479],{"type":419,"value":840},{"type":414,"tag":454,"props":2481,"children":2482},{"style":461},[2483],{"type":419,"value":2344},{"type":414,"tag":454,"props":2485,"children":2486},{"style":467},[2487],{"type":419,"value":705},{"type":414,"tag":454,"props":2489,"children":2490},{"style":461},[2491],{"type":419,"value":2492},"Main",{"type":414,"tag":454,"props":2494,"children":2495},{"style":467},[2496],{"type":419,"value":705},{"type":414,"tag":454,"props":2498,"children":2499},{"style":461},[2500],{"type":419,"value":2501},"Temp",{"type":414,"tag":454,"props":2503,"children":2504},{"style":467},[2505],{"type":419,"value":2448},{"type":414,"tag":454,"props":2507,"children":2509},{"class":456,"line":2508},36,[2510,2515,2519,2523,2527,2531,2535,2539,2543,2547],{"type":414,"tag":454,"props":2511,"children":2512},{"style":461},[2513],{"type":419,"value":2514},"                    Summary ",{"type":414,"tag":454,"props":2516,"children":2517},{"style":467},[2518],{"type":419,"value":987},{"type":414,"tag":454,"props":2520,"children":2521},{"style":525},[2522],{"type":419,"value":1781},{"type":414,"tag":454,"props":2524,"children":2525},{"style":467},[2526],{"type":419,"value":840},{"type":414,"tag":454,"props":2528,"children":2529},{"style":461},[2530],{"type":419,"value":2344},{"type":414,"tag":454,"props":2532,"children":2533},{"style":467},[2534],{"type":419,"value":705},{"type":414,"tag":454,"props":2536,"children":2537},{"style":461},[2538],{"type":419,"value":2492},{"type":414,"tag":454,"props":2540,"children":2541},{"style":467},[2542],{"type":419,"value":705},{"type":414,"tag":454,"props":2544,"children":2545},{"style":461},[2546],{"type":419,"value":2501},{"type":414,"tag":454,"props":2548,"children":2549},{"style":467},[2550],{"type":419,"value":964},{"type":414,"tag":454,"props":2552,"children":2554},{"class":456,"line":2553},37,[2555],{"type":414,"tag":454,"props":2556,"children":2557},{"style":467},[2558],{"type":419,"value":2559},"                })\n",{"type":414,"tag":454,"props":2561,"children":2563},{"class":456,"line":2562},38,[2564,2568,2573],{"type":414,"tag":454,"props":2565,"children":2566},{"style":467},[2567],{"type":419,"value":2330},{"type":414,"tag":454,"props":2569,"children":2570},{"style":525},[2571],{"type":419,"value":2572},"ToArray",{"type":414,"tag":454,"props":2574,"children":2575},{"style":467},[2576],{"type":419,"value":1176},{"type":414,"tag":454,"props":2578,"children":2580},{"class":456,"line":2579},39,[2581],{"type":414,"tag":454,"props":2582,"children":2583},{"style":467},[2584],{"type":419,"value":1004},{"type":414,"tag":454,"props":2586,"children":2588},{"class":456,"line":2587},40,[2589],{"type":414,"tag":454,"props":2590,"children":2591},{"style":467},[2592],{"type":419,"value":1193},{"type":414,"tag":415,"props":2594,"children":2595},{},[2596],{"type":419,"value":2597},"The weather forecasts of a specific geolocation are retrieved. Indeed coordinates (corresponding to Bordeaux in France) are passed to the Open Weather Map API call. In C# 12, we can alias any type so we can introduce an alias \"Coordinates\" for the coordinates tuple:",{"type":414,"tag":444,"props":2599,"children":2601},{"className":799,"code":2600,"language":326,"meta":401,"style":401},"using Coordinates = (double Latitude, double Longitude);\n\npublic class OpenWeatherService : IWeatherService\n{\n    private readonly IOpenWeatherMapApi _openWeatherMapApi;\n    private static readonly Coordinates BordeauxCoordinates = (44.837789, -0.57918\n",[2602],{"type":414,"tag":450,"props":2603,"children":2604},{"__ignoreMap":401},[2605,2646,2653,2676,2683,2706],{"type":414,"tag":454,"props":2606,"children":2607},{"class":456,"line":457},[2608,2613,2618,2622,2626,2630,2634,2638,2642],{"type":414,"tag":454,"props":2609,"children":2610},{"style":478},[2611],{"type":419,"value":2612},"using",{"type":414,"tag":454,"props":2614,"children":2615},{"style":815},[2616],{"type":419,"value":2617}," Coordinates",{"type":414,"tag":454,"props":2619,"children":2620},{"style":467},[2621],{"type":419,"value":1040},{"type":414,"tag":454,"props":2623,"children":2624},{"style":467},[2625],{"type":419,"value":1506},{"type":414,"tag":454,"props":2627,"children":2628},{"style":815},[2629],{"type":419,"value":1511},{"type":414,"tag":454,"props":2631,"children":2632},{"style":467},[2633],{"type":419,"value":1516},{"type":414,"tag":454,"props":2635,"children":2636},{"style":467},[2637],{"type":419,"value":1521},{"type":414,"tag":454,"props":2639,"children":2640},{"style":815},[2641],{"type":419,"value":1526},{"type":414,"tag":454,"props":2643,"children":2644},{"style":467},[2645],{"type":419,"value":1567},{"type":414,"tag":454,"props":2647,"children":2648},{"class":456,"line":605},[2649],{"type":414,"tag":454,"props":2650,"children":2651},{"emptyLinePlaceholder":609},[2652],{"type":419,"value":612},{"type":414,"tag":454,"props":2654,"children":2655},{"class":456,"line":615},[2656,2660,2664,2668,2672],{"type":414,"tag":454,"props":2657,"children":2658},{"style":865},[2659],{"type":419,"value":868},{"type":414,"tag":454,"props":2661,"children":2662},{"style":815},[2663],{"type":419,"value":873},{"type":414,"tag":454,"props":2665,"children":2666},{"style":815},[2667],{"type":419,"value":1444},{"type":414,"tag":454,"props":2669,"children":2670},{"style":467},[2671],{"type":419,"value":883},{"type":414,"tag":454,"props":2673,"children":2674},{"style":815},[2675],{"type":419,"value":1453},{"type":414,"tag":454,"props":2677,"children":2678},{"class":456,"line":630},[2679],{"type":414,"tag":454,"props":2680,"children":2681},{"style":467},[2682],{"type":419,"value":896},{"type":414,"tag":454,"props":2684,"children":2685},{"class":456,"line":899},[2686,2690,2694,2698,2702],{"type":414,"tag":454,"props":2687,"children":2688},{"style":865},[2689],{"type":419,"value":905},{"type":414,"tag":454,"props":2691,"children":2692},{"style":865},[2693],{"type":419,"value":910},{"type":414,"tag":454,"props":2695,"children":2696},{"style":815},[2697],{"type":419,"value":1476},{"type":414,"tag":454,"props":2699,"children":2700},{"style":815},[2701],{"type":419,"value":1481},{"type":414,"tag":454,"props":2703,"children":2704},{"style":467},[2705],{"type":419,"value":925},{"type":414,"tag":454,"props":2707,"children":2708},{"class":456,"line":928},[2709,2713,2717,2721,2725,2729,2733,2737,2741,2745,2749],{"type":414,"tag":454,"props":2710,"children":2711},{"style":865},[2712],{"type":419,"value":905},{"type":414,"tag":454,"props":2714,"children":2715},{"style":865},[2716],{"type":419,"value":1497},{"type":414,"tag":454,"props":2718,"children":2719},{"style":865},[2720],{"type":419,"value":910},{"type":414,"tag":454,"props":2722,"children":2723},{"style":815},[2724],{"type":419,"value":2617},{"type":414,"tag":454,"props":2726,"children":2727},{"style":815},[2728],{"type":419,"value":1535},{"type":414,"tag":454,"props":2730,"children":2731},{"style":467},[2732],{"type":419,"value":1040},{"type":414,"tag":454,"props":2734,"children":2735},{"style":467},[2736],{"type":419,"value":1544},{"type":414,"tag":454,"props":2738,"children":2739},{"style":478},[2740],{"type":419,"value":1549},{"type":414,"tag":454,"props":2742,"children":2743},{"style":467},[2744],{"type":419,"value":1516},{"type":414,"tag":454,"props":2746,"children":2747},{"style":467},[2748],{"type":419,"value":533},{"type":414,"tag":454,"props":2750,"children":2751},{"style":478},[2752],{"type":419,"value":2753},"0.57918\n",{"type":414,"tag":415,"props":2755,"children":2756},{},[2757,2759,2764,2766,2773],{"type":419,"value":2758},"Once this call is done, results are mapped to the expected model ",{"type":414,"tag":450,"props":2760,"children":2762},{"className":2761},[],[2763],{"type":419,"value":1081},{"type":419,"value":2765},". A lambda expression is used to get the \"weather summary\" from a temperature. If we want to have a default summary, that's something we can do thanks to the support of ",{"type":414,"tag":433,"props":2767,"children":2770},{"href":2768,"rel":2769},"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12#default-lambda-parameters",[437],[2771],{"type":419,"value":2772},"default lambda parameters",{"type":419,"value":2774}," in C#12.",{"type":414,"tag":444,"props":2776,"children":2778},{"className":799,"code":2777,"language":326,"meta":401,"style":401},"var computeWeatherSummary = (double temperature, string defaultSummary = \"Warm\") =>\n    temperature switch\n    {\n        \u003C 0 => \"Freezing\",\n        >= 0 and \u003C 5 => \"Bracing\",\n        >= 5 and \u003C 12 => \"Chilly\",\n        >= 12 and \u003C 18 => \"Cool\",\n        >= 18 and \u003C 24 => \"Mild\",\n        >= 24 and \u003C 30 => \"Warm\",\n        >= 30 and \u003C 35 => \"Balmy\",\n        >= 35 and \u003C 40 => \"Hot\",\n        >= 40 and \u003C 45 => \"Sweltering\",\n        >= 45 => \"Scorching\",\n        _ => defaultSummary\n    };\n",[2779],{"type":414,"tag":450,"props":2780,"children":2781},{"__ignoreMap":401},[2782,2844,2856,2863,2895,2939,2982,3025,3068,3111,3154,3197,3240,3271,3288],{"type":414,"tag":454,"props":2783,"children":2784},{"class":456,"line":457},[2785,2790,2794,2798,2802,2806,2810,2815,2820,2824,2828,2832,2836,2840],{"type":414,"tag":454,"props":2786,"children":2787},{"style":815},[2788],{"type":419,"value":2789},"var",{"type":414,"tag":454,"props":2791,"children":2792},{"style":815},[2793],{"type":419,"value":1781},{"type":414,"tag":454,"props":2795,"children":2796},{"style":467},[2797],{"type":419,"value":1040},{"type":414,"tag":454,"props":2799,"children":2800},{"style":467},[2801],{"type":419,"value":1506},{"type":414,"tag":454,"props":2803,"children":2804},{"style":815},[2805],{"type":419,"value":1794},{"type":414,"tag":454,"props":2807,"children":2808},{"style":467},[2809],{"type":419,"value":1516},{"type":414,"tag":454,"props":2811,"children":2812},{"style":467},[2813],{"type":419,"value":2814}," string",{"type":414,"tag":454,"props":2816,"children":2817},{"style":815},[2818],{"type":419,"value":2819}," defaultSummary",{"type":414,"tag":454,"props":2821,"children":2822},{"style":467},[2823],{"type":419,"value":1040},{"type":414,"tag":454,"props":2825,"children":2826},{"style":467},[2827],{"type":419,"value":1045},{"type":414,"tag":454,"props":2829,"children":2830},{"style":599},[2831],{"type":419,"value":2085},{"type":414,"tag":454,"props":2833,"children":2834},{"style":467},[2835],{"type":419,"value":845},{"type":414,"tag":454,"props":2837,"children":2838},{"style":467},[2839],{"type":419,"value":668},{"type":414,"tag":454,"props":2841,"children":2842},{"style":467},[2843],{"type":419,"value":1803},{"type":414,"tag":454,"props":2845,"children":2846},{"class":456,"line":605},[2847,2852],{"type":414,"tag":454,"props":2848,"children":2849},{"style":461},[2850],{"type":419,"value":2851},"    temperature ",{"type":414,"tag":454,"props":2853,"children":2854},{"style":619},[2855],{"type":419,"value":1816},{"type":414,"tag":454,"props":2857,"children":2858},{"class":456,"line":615},[2859],{"type":414,"tag":454,"props":2860,"children":2861},{"style":467},[2862],{"type":419,"value":973},{"type":414,"tag":454,"props":2864,"children":2865},{"class":456,"line":630},[2866,2871,2875,2879,2883,2887,2891],{"type":414,"tag":454,"props":2867,"children":2868},{"style":467},[2869],{"type":419,"value":2870},"        \u003C",{"type":414,"tag":454,"props":2872,"children":2873},{"style":478},[2874],{"type":419,"value":1837},{"type":414,"tag":454,"props":2876,"children":2877},{"style":467},[2878],{"type":419,"value":1842},{"type":414,"tag":454,"props":2880,"children":2881},{"style":467},[2882],{"type":419,"value":1045},{"type":414,"tag":454,"props":2884,"children":2885},{"style":599},[2886],{"type":419,"value":1851},{"type":414,"tag":454,"props":2888,"children":2889},{"style":467},[2890],{"type":419,"value":845},{"type":414,"tag":454,"props":2892,"children":2893},{"style":467},[2894],{"type":419,"value":1860},{"type":414,"tag":454,"props":2896,"children":2897},{"class":456,"line":899},[2898,2903,2907,2911,2915,2919,2923,2927,2931,2935],{"type":414,"tag":454,"props":2899,"children":2900},{"style":467},[2901],{"type":419,"value":2902},"        >=",{"type":414,"tag":454,"props":2904,"children":2905},{"style":478},[2906],{"type":419,"value":1837},{"type":414,"tag":454,"props":2908,"children":2909},{"style":467},[2910],{"type":419,"value":1878},{"type":414,"tag":454,"props":2912,"children":2913},{"style":467},[2914],{"type":419,"value":1883},{"type":414,"tag":454,"props":2916,"children":2917},{"style":478},[2918],{"type":419,"value":1888},{"type":414,"tag":454,"props":2920,"children":2921},{"style":467},[2922],{"type":419,"value":1842},{"type":414,"tag":454,"props":2924,"children":2925},{"style":467},[2926],{"type":419,"value":1045},{"type":414,"tag":454,"props":2928,"children":2929},{"style":599},[2930],{"type":419,"value":1901},{"type":414,"tag":454,"props":2932,"children":2933},{"style":467},[2934],{"type":419,"value":845},{"type":414,"tag":454,"props":2936,"children":2937},{"style":467},[2938],{"type":419,"value":1860},{"type":414,"tag":454,"props":2940,"children":2941},{"class":456,"line":928},[2942,2946,2950,2954,2958,2962,2966,2970,2974,2978],{"type":414,"tag":454,"props":2943,"children":2944},{"style":467},[2945],{"type":419,"value":2902},{"type":414,"tag":454,"props":2947,"children":2948},{"style":478},[2949],{"type":419,"value":1888},{"type":414,"tag":454,"props":2951,"children":2952},{"style":467},[2953],{"type":419,"value":1878},{"type":414,"tag":454,"props":2955,"children":2956},{"style":467},[2957],{"type":419,"value":1883},{"type":414,"tag":454,"props":2959,"children":2960},{"style":478},[2961],{"type":419,"value":1934},{"type":414,"tag":454,"props":2963,"children":2964},{"style":467},[2965],{"type":419,"value":1842},{"type":414,"tag":454,"props":2967,"children":2968},{"style":467},[2969],{"type":419,"value":1045},{"type":414,"tag":454,"props":2971,"children":2972},{"style":599},[2973],{"type":419,"value":1947},{"type":414,"tag":454,"props":2975,"children":2976},{"style":467},[2977],{"type":419,"value":845},{"type":414,"tag":454,"props":2979,"children":2980},{"style":467},[2981],{"type":419,"value":1860},{"type":414,"tag":454,"props":2983,"children":2984},{"class":456,"line":936},[2985,2989,2993,2997,3001,3005,3009,3013,3017,3021],{"type":414,"tag":454,"props":2986,"children":2987},{"style":467},[2988],{"type":419,"value":2902},{"type":414,"tag":454,"props":2990,"children":2991},{"style":478},[2992],{"type":419,"value":1934},{"type":414,"tag":454,"props":2994,"children":2995},{"style":467},[2996],{"type":419,"value":1878},{"type":414,"tag":454,"props":2998,"children":2999},{"style":467},[3000],{"type":419,"value":1883},{"type":414,"tag":454,"props":3002,"children":3003},{"style":478},[3004],{"type":419,"value":1980},{"type":414,"tag":454,"props":3006,"children":3007},{"style":467},[3008],{"type":419,"value":1842},{"type":414,"tag":454,"props":3010,"children":3011},{"style":467},[3012],{"type":419,"value":1045},{"type":414,"tag":454,"props":3014,"children":3015},{"style":599},[3016],{"type":419,"value":1993},{"type":414,"tag":454,"props":3018,"children":3019},{"style":467},[3020],{"type":419,"value":845},{"type":414,"tag":454,"props":3022,"children":3023},{"style":467},[3024],{"type":419,"value":1860},{"type":414,"tag":454,"props":3026,"children":3027},{"class":456,"line":967},[3028,3032,3036,3040,3044,3048,3052,3056,3060,3064],{"type":414,"tag":454,"props":3029,"children":3030},{"style":467},[3031],{"type":419,"value":2902},{"type":414,"tag":454,"props":3033,"children":3034},{"style":478},[3035],{"type":419,"value":1980},{"type":414,"tag":454,"props":3037,"children":3038},{"style":467},[3039],{"type":419,"value":1878},{"type":414,"tag":454,"props":3041,"children":3042},{"style":467},[3043],{"type":419,"value":1883},{"type":414,"tag":454,"props":3045,"children":3046},{"style":478},[3047],{"type":419,"value":2026},{"type":414,"tag":454,"props":3049,"children":3050},{"style":467},[3051],{"type":419,"value":1842},{"type":414,"tag":454,"props":3053,"children":3054},{"style":467},[3055],{"type":419,"value":1045},{"type":414,"tag":454,"props":3057,"children":3058},{"style":599},[3059],{"type":419,"value":2039},{"type":414,"tag":454,"props":3061,"children":3062},{"style":467},[3063],{"type":419,"value":845},{"type":414,"tag":454,"props":3065,"children":3066},{"style":467},[3067],{"type":419,"value":1860},{"type":414,"tag":454,"props":3069,"children":3070},{"class":456,"line":976},[3071,3075,3079,3083,3087,3091,3095,3099,3103,3107],{"type":414,"tag":454,"props":3072,"children":3073},{"style":467},[3074],{"type":419,"value":2902},{"type":414,"tag":454,"props":3076,"children":3077},{"style":478},[3078],{"type":419,"value":2026},{"type":414,"tag":454,"props":3080,"children":3081},{"style":467},[3082],{"type":419,"value":1878},{"type":414,"tag":454,"props":3084,"children":3085},{"style":467},[3086],{"type":419,"value":1883},{"type":414,"tag":454,"props":3088,"children":3089},{"style":478},[3090],{"type":419,"value":2072},{"type":414,"tag":454,"props":3092,"children":3093},{"style":467},[3094],{"type":419,"value":1842},{"type":414,"tag":454,"props":3096,"children":3097},{"style":467},[3098],{"type":419,"value":1045},{"type":414,"tag":454,"props":3100,"children":3101},{"style":599},[3102],{"type":419,"value":2085},{"type":414,"tag":454,"props":3104,"children":3105},{"style":467},[3106],{"type":419,"value":845},{"type":414,"tag":454,"props":3108,"children":3109},{"style":467},[3110],{"type":419,"value":1860},{"type":414,"tag":454,"props":3112,"children":3113},{"class":456,"line":998},[3114,3118,3122,3126,3130,3134,3138,3142,3146,3150],{"type":414,"tag":454,"props":3115,"children":3116},{"style":467},[3117],{"type":419,"value":2902},{"type":414,"tag":454,"props":3119,"children":3120},{"style":478},[3121],{"type":419,"value":2072},{"type":414,"tag":454,"props":3123,"children":3124},{"style":467},[3125],{"type":419,"value":1878},{"type":414,"tag":454,"props":3127,"children":3128},{"style":467},[3129],{"type":419,"value":1883},{"type":414,"tag":454,"props":3131,"children":3132},{"style":478},[3133],{"type":419,"value":2118},{"type":414,"tag":454,"props":3135,"children":3136},{"style":467},[3137],{"type":419,"value":1842},{"type":414,"tag":454,"props":3139,"children":3140},{"style":467},[3141],{"type":419,"value":1045},{"type":414,"tag":454,"props":3143,"children":3144},{"style":599},[3145],{"type":419,"value":2131},{"type":414,"tag":454,"props":3147,"children":3148},{"style":467},[3149],{"type":419,"value":845},{"type":414,"tag":454,"props":3151,"children":3152},{"style":467},[3153],{"type":419,"value":1860},{"type":414,"tag":454,"props":3155,"children":3156},{"class":456,"line":1007},[3157,3161,3165,3169,3173,3177,3181,3185,3189,3193],{"type":414,"tag":454,"props":3158,"children":3159},{"style":467},[3160],{"type":419,"value":2902},{"type":414,"tag":454,"props":3162,"children":3163},{"style":478},[3164],{"type":419,"value":2118},{"type":414,"tag":454,"props":3166,"children":3167},{"style":467},[3168],{"type":419,"value":1878},{"type":414,"tag":454,"props":3170,"children":3171},{"style":467},[3172],{"type":419,"value":1883},{"type":414,"tag":454,"props":3174,"children":3175},{"style":478},[3176],{"type":419,"value":2164},{"type":414,"tag":454,"props":3178,"children":3179},{"style":467},[3180],{"type":419,"value":1842},{"type":414,"tag":454,"props":3182,"children":3183},{"style":467},[3184],{"type":419,"value":1045},{"type":414,"tag":454,"props":3186,"children":3187},{"style":599},[3188],{"type":419,"value":2177},{"type":414,"tag":454,"props":3190,"children":3191},{"style":467},[3192],{"type":419,"value":845},{"type":414,"tag":454,"props":3194,"children":3195},{"style":467},[3196],{"type":419,"value":1860},{"type":414,"tag":454,"props":3198,"children":3199},{"class":456,"line":1015},[3200,3204,3208,3212,3216,3220,3224,3228,3232,3236],{"type":414,"tag":454,"props":3201,"children":3202},{"style":467},[3203],{"type":419,"value":2902},{"type":414,"tag":454,"props":3205,"children":3206},{"style":478},[3207],{"type":419,"value":2164},{"type":414,"tag":454,"props":3209,"children":3210},{"style":467},[3211],{"type":419,"value":1878},{"type":414,"tag":454,"props":3213,"children":3214},{"style":467},[3215],{"type":419,"value":1883},{"type":414,"tag":454,"props":3217,"children":3218},{"style":478},[3219],{"type":419,"value":2210},{"type":414,"tag":454,"props":3221,"children":3222},{"style":467},[3223],{"type":419,"value":1842},{"type":414,"tag":454,"props":3225,"children":3226},{"style":467},[3227],{"type":419,"value":1045},{"type":414,"tag":454,"props":3229,"children":3230},{"style":599},[3231],{"type":419,"value":2223},{"type":414,"tag":454,"props":3233,"children":3234},{"style":467},[3235],{"type":419,"value":845},{"type":414,"tag":454,"props":3237,"children":3238},{"style":467},[3239],{"type":419,"value":1860},{"type":414,"tag":454,"props":3241,"children":3242},{"class":456,"line":1061},[3243,3247,3251,3255,3259,3263,3267],{"type":414,"tag":454,"props":3244,"children":3245},{"style":467},[3246],{"type":419,"value":2902},{"type":414,"tag":454,"props":3248,"children":3249},{"style":478},[3250],{"type":419,"value":2210},{"type":414,"tag":454,"props":3252,"children":3253},{"style":467},[3254],{"type":419,"value":1842},{"type":414,"tag":454,"props":3256,"children":3257},{"style":467},[3258],{"type":419,"value":1045},{"type":414,"tag":454,"props":3260,"children":3261},{"style":599},[3262],{"type":419,"value":2256},{"type":414,"tag":454,"props":3264,"children":3265},{"style":467},[3266],{"type":419,"value":845},{"type":414,"tag":454,"props":3268,"children":3269},{"style":467},[3270],{"type":419,"value":1860},{"type":414,"tag":454,"props":3272,"children":3273},{"class":456,"line":1107},[3274,3279,3283],{"type":414,"tag":454,"props":3275,"children":3276},{"style":461},[3277],{"type":419,"value":3278},"        _ ",{"type":414,"tag":454,"props":3280,"children":3281},{"style":467},[3282],{"type":419,"value":2278},{"type":414,"tag":454,"props":3284,"children":3285},{"style":461},[3286],{"type":419,"value":3287}," defaultSummary\n",{"type":414,"tag":454,"props":3289,"children":3290},{"class":456,"line":1144},[3291],{"type":414,"tag":454,"props":3292,"children":3293},{"style":467},[3294],{"type":419,"value":3295},"    };\n",{"type":414,"tag":415,"props":3297,"children":3298},{},[3299,3304],{"type":414,"tag":450,"props":3300,"children":3302},{"className":3301},[],[3303],{"type":419,"value":1404},{"type":419,"value":3305}," does not have this logic because Summaries are randomly selected from an array containing possible summaries.",{"type":414,"tag":444,"props":3307,"children":3309},{"className":799,"code":3308,"language":326,"meta":401,"style":401},"private static readonly string[] Summaries = new [] { \"Freezing\", \"Bracing\", \"Chilly\", \"Cool\", \"Mild\", \"Warm\", \"Balmy\", \"Hot\", \"Sweltering\", \"Scorching\" };\n",[3310],{"type":414,"tag":450,"props":3311,"children":3312},{"__ignoreMap":401},[3313],{"type":414,"tag":454,"props":3314,"children":3315},{"class":456,"line":457},[3316,3321,3325,3329,3333,3338,3343,3347,3352,3357,3362,3366,3370,3374,3378,3382,3386,3390,3394,3398,3402,3406,3410,3414,3418,3422,3426,3430,3434,3438,3442,3446,3450,3454,3458,3462,3466,3470,3474,3478,3482,3486,3490,3494,3498,3502,3506,3510,3514,3518],{"type":414,"tag":454,"props":3317,"children":3318},{"style":865},[3319],{"type":419,"value":3320},"private",{"type":414,"tag":454,"props":3322,"children":3323},{"style":865},[3324],{"type":419,"value":1497},{"type":414,"tag":454,"props":3326,"children":3327},{"style":865},[3328],{"type":419,"value":910},{"type":414,"tag":454,"props":3330,"children":3331},{"style":467},[3332],{"type":419,"value":2814},{"type":414,"tag":454,"props":3334,"children":3335},{"style":467},[3336],{"type":419,"value":3337},"[]",{"type":414,"tag":454,"props":3339,"children":3340},{"style":815},[3341],{"type":419,"value":3342}," Summaries",{"type":414,"tag":454,"props":3344,"children":3345},{"style":467},[3346],{"type":419,"value":1040},{"type":414,"tag":454,"props":3348,"children":3349},{"style":467},[3350],{"type":419,"value":3351}," new",{"type":414,"tag":454,"props":3353,"children":3354},{"style":467},[3355],{"type":419,"value":3356}," []",{"type":414,"tag":454,"props":3358,"children":3359},{"style":467},[3360],{"type":419,"value":3361}," {",{"type":414,"tag":454,"props":3363,"children":3364},{"style":467},[3365],{"type":419,"value":1045},{"type":414,"tag":454,"props":3367,"children":3368},{"style":599},[3369],{"type":419,"value":1851},{"type":414,"tag":454,"props":3371,"children":3372},{"style":467},[3373],{"type":419,"value":845},{"type":414,"tag":454,"props":3375,"children":3376},{"style":467},[3377],{"type":419,"value":1516},{"type":414,"tag":454,"props":3379,"children":3380},{"style":467},[3381],{"type":419,"value":1045},{"type":414,"tag":454,"props":3383,"children":3384},{"style":599},[3385],{"type":419,"value":1901},{"type":414,"tag":454,"props":3387,"children":3388},{"style":467},[3389],{"type":419,"value":845},{"type":414,"tag":454,"props":3391,"children":3392},{"style":467},[3393],{"type":419,"value":1516},{"type":414,"tag":454,"props":3395,"children":3396},{"style":467},[3397],{"type":419,"value":1045},{"type":414,"tag":454,"props":3399,"children":3400},{"style":599},[3401],{"type":419,"value":1947},{"type":414,"tag":454,"props":3403,"children":3404},{"style":467},[3405],{"type":419,"value":845},{"type":414,"tag":454,"props":3407,"children":3408},{"style":467},[3409],{"type":419,"value":1516},{"type":414,"tag":454,"props":3411,"children":3412},{"style":467},[3413],{"type":419,"value":1045},{"type":414,"tag":454,"props":3415,"children":3416},{"style":599},[3417],{"type":419,"value":1993},{"type":414,"tag":454,"props":3419,"children":3420},{"style":467},[3421],{"type":419,"value":845},{"type":414,"tag":454,"props":3423,"children":3424},{"style":467},[3425],{"type":419,"value":1516},{"type":414,"tag":454,"props":3427,"children":3428},{"style":467},[3429],{"type":419,"value":1045},{"type":414,"tag":454,"props":3431,"children":3432},{"style":599},[3433],{"type":419,"value":2039},{"type":414,"tag":454,"props":3435,"children":3436},{"style":467},[3437],{"type":419,"value":845},{"type":414,"tag":454,"props":3439,"children":3440},{"style":467},[3441],{"type":419,"value":1516},{"type":414,"tag":454,"props":3443,"children":3444},{"style":467},[3445],{"type":419,"value":1045},{"type":414,"tag":454,"props":3447,"children":3448},{"style":599},[3449],{"type":419,"value":2085},{"type":414,"tag":454,"props":3451,"children":3452},{"style":467},[3453],{"type":419,"value":845},{"type":414,"tag":454,"props":3455,"children":3456},{"style":467},[3457],{"type":419,"value":1516},{"type":414,"tag":454,"props":3459,"children":3460},{"style":467},[3461],{"type":419,"value":1045},{"type":414,"tag":454,"props":3463,"children":3464},{"style":599},[3465],{"type":419,"value":2131},{"type":414,"tag":454,"props":3467,"children":3468},{"style":467},[3469],{"type":419,"value":845},{"type":414,"tag":454,"props":3471,"children":3472},{"style":467},[3473],{"type":419,"value":1516},{"type":414,"tag":454,"props":3475,"children":3476},{"style":467},[3477],{"type":419,"value":1045},{"type":414,"tag":454,"props":3479,"children":3480},{"style":599},[3481],{"type":419,"value":2177},{"type":414,"tag":454,"props":3483,"children":3484},{"style":467},[3485],{"type":419,"value":845},{"type":414,"tag":454,"props":3487,"children":3488},{"style":467},[3489],{"type":419,"value":1516},{"type":414,"tag":454,"props":3491,"children":3492},{"style":467},[3493],{"type":419,"value":1045},{"type":414,"tag":454,"props":3495,"children":3496},{"style":599},[3497],{"type":419,"value":2223},{"type":414,"tag":454,"props":3499,"children":3500},{"style":467},[3501],{"type":419,"value":845},{"type":414,"tag":454,"props":3503,"children":3504},{"style":467},[3505],{"type":419,"value":1516},{"type":414,"tag":454,"props":3507,"children":3508},{"style":467},[3509],{"type":419,"value":1045},{"type":414,"tag":454,"props":3511,"children":3512},{"style":599},[3513],{"type":419,"value":2256},{"type":414,"tag":454,"props":3515,"children":3516},{"style":467},[3517],{"type":419,"value":845},{"type":414,"tag":454,"props":3519,"children":3520},{"style":467},[3521],{"type":419,"value":3522}," };\n",{"type":414,"tag":415,"props":3524,"children":3525},{},[3526,3528,3535],{"type":419,"value":3527},"With ",{"type":414,"tag":433,"props":3529,"children":3532},{"href":3530,"rel":3531},"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12#collection-expressions",[437],[3533],{"type":419,"value":3534},"collection expressions",{"type":419,"value":3536},", this array can be defined directly with square brackets.",{"type":414,"tag":444,"props":3538,"children":3540},{"className":799,"code":3539,"language":326,"meta":401,"style":401},"private static readonly string[] Summaries = [ \"Freezing\", \"Bracing\", \"Chilly\", \"Cool\", \"Mild\", \"Warm\", \"Balmy\", \"Hot\", \"Sweltering\", \"Scorching\"];\n",[3541],{"type":414,"tag":450,"props":3542,"children":3543},{"__ignoreMap":401},[3544],{"type":414,"tag":454,"props":3545,"children":3546},{"class":456,"line":457},[3547,3551,3555,3559,3563,3567,3571,3575,3580,3584,3588,3592,3596,3600,3604,3608,3612,3616,3620,3624,3628,3632,3636,3640,3644,3648,3652,3656,3660,3664,3668,3672,3676,3680,3684,3688,3692,3696,3700,3704,3708,3712,3716,3720,3724,3728,3732,3736],{"type":414,"tag":454,"props":3548,"children":3549},{"style":865},[3550],{"type":419,"value":3320},{"type":414,"tag":454,"props":3552,"children":3553},{"style":865},[3554],{"type":419,"value":1497},{"type":414,"tag":454,"props":3556,"children":3557},{"style":865},[3558],{"type":419,"value":910},{"type":414,"tag":454,"props":3560,"children":3561},{"style":467},[3562],{"type":419,"value":2814},{"type":414,"tag":454,"props":3564,"children":3565},{"style":467},[3566],{"type":419,"value":3337},{"type":414,"tag":454,"props":3568,"children":3569},{"style":815},[3570],{"type":419,"value":3342},{"type":414,"tag":454,"props":3572,"children":3573},{"style":467},[3574],{"type":419,"value":1040},{"type":414,"tag":454,"props":3576,"children":3577},{"style":467},[3578],{"type":419,"value":3579}," [",{"type":414,"tag":454,"props":3581,"children":3582},{"style":467},[3583],{"type":419,"value":1045},{"type":414,"tag":454,"props":3585,"children":3586},{"style":599},[3587],{"type":419,"value":1851},{"type":414,"tag":454,"props":3589,"children":3590},{"style":467},[3591],{"type":419,"value":845},{"type":414,"tag":454,"props":3593,"children":3594},{"style":467},[3595],{"type":419,"value":1516},{"type":414,"tag":454,"props":3597,"children":3598},{"style":467},[3599],{"type":419,"value":1045},{"type":414,"tag":454,"props":3601,"children":3602},{"style":599},[3603],{"type":419,"value":1901},{"type":414,"tag":454,"props":3605,"children":3606},{"style":467},[3607],{"type":419,"value":845},{"type":414,"tag":454,"props":3609,"children":3610},{"style":467},[3611],{"type":419,"value":1516},{"type":414,"tag":454,"props":3613,"children":3614},{"style":467},[3615],{"type":419,"value":1045},{"type":414,"tag":454,"props":3617,"children":3618},{"style":599},[3619],{"type":419,"value":1947},{"type":414,"tag":454,"props":3621,"children":3622},{"style":467},[3623],{"type":419,"value":845},{"type":414,"tag":454,"props":3625,"children":3626},{"style":467},[3627],{"type":419,"value":1516},{"type":414,"tag":454,"props":3629,"children":3630},{"style":467},[3631],{"type":419,"value":1045},{"type":414,"tag":454,"props":3633,"children":3634},{"style":599},[3635],{"type":419,"value":1993},{"type":414,"tag":454,"props":3637,"children":3638},{"style":467},[3639],{"type":419,"value":845},{"type":414,"tag":454,"props":3641,"children":3642},{"style":467},[3643],{"type":419,"value":1516},{"type":414,"tag":454,"props":3645,"children":3646},{"style":467},[3647],{"type":419,"value":1045},{"type":414,"tag":454,"props":3649,"children":3650},{"style":599},[3651],{"type":419,"value":2039},{"type":414,"tag":454,"props":3653,"children":3654},{"style":467},[3655],{"type":419,"value":845},{"type":414,"tag":454,"props":3657,"children":3658},{"style":467},[3659],{"type":419,"value":1516},{"type":414,"tag":454,"props":3661,"children":3662},{"style":467},[3663],{"type":419,"value":1045},{"type":414,"tag":454,"props":3665,"children":3666},{"style":599},[3667],{"type":419,"value":2085},{"type":414,"tag":454,"props":3669,"children":3670},{"style":467},[3671],{"type":419,"value":845},{"type":414,"tag":454,"props":3673,"children":3674},{"style":467},[3675],{"type":419,"value":1516},{"type":414,"tag":454,"props":3677,"children":3678},{"style":467},[3679],{"type":419,"value":1045},{"type":414,"tag":454,"props":3681,"children":3682},{"style":599},[3683],{"type":419,"value":2131},{"type":414,"tag":454,"props":3685,"children":3686},{"style":467},[3687],{"type":419,"value":845},{"type":414,"tag":454,"props":3689,"children":3690},{"style":467},[3691],{"type":419,"value":1516},{"type":414,"tag":454,"props":3693,"children":3694},{"style":467},[3695],{"type":419,"value":1045},{"type":414,"tag":454,"props":3697,"children":3698},{"style":599},[3699],{"type":419,"value":2177},{"type":414,"tag":454,"props":3701,"children":3702},{"style":467},[3703],{"type":419,"value":845},{"type":414,"tag":454,"props":3705,"children":3706},{"style":467},[3707],{"type":419,"value":1516},{"type":414,"tag":454,"props":3709,"children":3710},{"style":467},[3711],{"type":419,"value":1045},{"type":414,"tag":454,"props":3713,"children":3714},{"style":599},[3715],{"type":419,"value":2223},{"type":414,"tag":454,"props":3717,"children":3718},{"style":467},[3719],{"type":419,"value":845},{"type":414,"tag":454,"props":3721,"children":3722},{"style":467},[3723],{"type":419,"value":1516},{"type":414,"tag":454,"props":3725,"children":3726},{"style":467},[3727],{"type":419,"value":1045},{"type":414,"tag":454,"props":3729,"children":3730},{"style":599},[3731],{"type":419,"value":2256},{"type":414,"tag":454,"props":3733,"children":3734},{"style":467},[3735],{"type":419,"value":845},{"type":414,"tag":454,"props":3737,"children":3738},{"style":467},[3739],{"type":419,"value":3740},"];\n",{"type":414,"tag":415,"props":3742,"children":3743},{},[3744],{"type":419,"value":3745},"It would work with other types of collections as well. If we needed to have another list containing only cold summaries and avoid duplication between the two lists, we could also define the two lists and use the spread operator.",{"type":414,"tag":444,"props":3747,"children":3749},{"className":799,"code":3748,"language":326,"meta":401,"style":401}," private static readonly IList\u003Cstring> ColdAdjectives = [\"Freezing\", \"Bracing\", \"Chilly\", \"Cool\"];\n private static readonly string[] Summaries = [ ..ColdAdjectives, \"Mild\", \"Warm\", \"Balmy\", \"Hot\", \"Sweltering\", \"Scorching\"];\n",[3750],{"type":414,"tag":450,"props":3751,"children":3752},{"__ignoreMap":401},[3753,3864],{"type":414,"tag":454,"props":3754,"children":3755},{"class":456,"line":457},[3756,3761,3765,3769,3774,3778,3783,3787,3792,3796,3800,3804,3808,3812,3816,3820,3824,3828,3832,3836,3840,3844,3848,3852,3856,3860],{"type":414,"tag":454,"props":3757,"children":3758},{"style":865},[3759],{"type":419,"value":3760}," private",{"type":414,"tag":454,"props":3762,"children":3763},{"style":865},[3764],{"type":419,"value":1497},{"type":414,"tag":454,"props":3766,"children":3767},{"style":865},[3768],{"type":419,"value":910},{"type":414,"tag":454,"props":3770,"children":3771},{"style":815},[3772],{"type":419,"value":3773}," IList",{"type":414,"tag":454,"props":3775,"children":3776},{"style":467},[3777],{"type":419,"value":1122},{"type":414,"tag":454,"props":3779,"children":3780},{"style":467},[3781],{"type":419,"value":3782},"string",{"type":414,"tag":454,"props":3784,"children":3785},{"style":467},[3786],{"type":419,"value":1291},{"type":414,"tag":454,"props":3788,"children":3789},{"style":815},[3790],{"type":419,"value":3791}," ColdAdjectives",{"type":414,"tag":454,"props":3793,"children":3794},{"style":467},[3795],{"type":419,"value":1040},{"type":414,"tag":454,"props":3797,"children":3798},{"style":467},[3799],{"type":419,"value":3579},{"type":414,"tag":454,"props":3801,"children":3802},{"style":467},[3803],{"type":419,"value":845},{"type":414,"tag":454,"props":3805,"children":3806},{"style":599},[3807],{"type":419,"value":1851},{"type":414,"tag":454,"props":3809,"children":3810},{"style":467},[3811],{"type":419,"value":845},{"type":414,"tag":454,"props":3813,"children":3814},{"style":467},[3815],{"type":419,"value":1516},{"type":414,"tag":454,"props":3817,"children":3818},{"style":467},[3819],{"type":419,"value":1045},{"type":414,"tag":454,"props":3821,"children":3822},{"style":599},[3823],{"type":419,"value":1901},{"type":414,"tag":454,"props":3825,"children":3826},{"style":467},[3827],{"type":419,"value":845},{"type":414,"tag":454,"props":3829,"children":3830},{"style":467},[3831],{"type":419,"value":1516},{"type":414,"tag":454,"props":3833,"children":3834},{"style":467},[3835],{"type":419,"value":1045},{"type":414,"tag":454,"props":3837,"children":3838},{"style":599},[3839],{"type":419,"value":1947},{"type":414,"tag":454,"props":3841,"children":3842},{"style":467},[3843],{"type":419,"value":845},{"type":414,"tag":454,"props":3845,"children":3846},{"style":467},[3847],{"type":419,"value":1516},{"type":414,"tag":454,"props":3849,"children":3850},{"style":467},[3851],{"type":419,"value":1045},{"type":414,"tag":454,"props":3853,"children":3854},{"style":599},[3855],{"type":419,"value":1993},{"type":414,"tag":454,"props":3857,"children":3858},{"style":467},[3859],{"type":419,"value":845},{"type":414,"tag":454,"props":3861,"children":3862},{"style":467},[3863],{"type":419,"value":3740},{"type":414,"tag":454,"props":3865,"children":3866},{"class":456,"line":605},[3867,3871,3875,3879,3883,3887,3891,3895,3899,3904,3909,3913,3917,3921,3925,3929,3933,3937,3941,3945,3949,3953,3957,3961,3965,3969,3973,3977,3981,3985,3989,3993,3997,4001,4005],{"type":414,"tag":454,"props":3868,"children":3869},{"style":865},[3870],{"type":419,"value":3760},{"type":414,"tag":454,"props":3872,"children":3873},{"style":865},[3874],{"type":419,"value":1497},{"type":414,"tag":454,"props":3876,"children":3877},{"style":865},[3878],{"type":419,"value":910},{"type":414,"tag":454,"props":3880,"children":3881},{"style":467},[3882],{"type":419,"value":2814},{"type":414,"tag":454,"props":3884,"children":3885},{"style":467},[3886],{"type":419,"value":3337},{"type":414,"tag":454,"props":3888,"children":3889},{"style":815},[3890],{"type":419,"value":3342},{"type":414,"tag":454,"props":3892,"children":3893},{"style":467},[3894],{"type":419,"value":1040},{"type":414,"tag":454,"props":3896,"children":3897},{"style":467},[3898],{"type":419,"value":3579},{"type":414,"tag":454,"props":3900,"children":3901},{"style":467},[3902],{"type":419,"value":3903}," ..",{"type":414,"tag":454,"props":3905,"children":3906},{"style":461},[3907],{"type":419,"value":3908},"ColdAdjectives",{"type":414,"tag":454,"props":3910,"children":3911},{"style":467},[3912],{"type":419,"value":1516},{"type":414,"tag":454,"props":3914,"children":3915},{"style":467},[3916],{"type":419,"value":1045},{"type":414,"tag":454,"props":3918,"children":3919},{"style":599},[3920],{"type":419,"value":2039},{"type":414,"tag":454,"props":3922,"children":3923},{"style":467},[3924],{"type":419,"value":845},{"type":414,"tag":454,"props":3926,"children":3927},{"style":467},[3928],{"type":419,"value":1516},{"type":414,"tag":454,"props":3930,"children":3931},{"style":467},[3932],{"type":419,"value":1045},{"type":414,"tag":454,"props":3934,"children":3935},{"style":599},[3936],{"type":419,"value":2085},{"type":414,"tag":454,"props":3938,"children":3939},{"style":467},[3940],{"type":419,"value":845},{"type":414,"tag":454,"props":3942,"children":3943},{"style":467},[3944],{"type":419,"value":1516},{"type":414,"tag":454,"props":3946,"children":3947},{"style":467},[3948],{"type":419,"value":1045},{"type":414,"tag":454,"props":3950,"children":3951},{"style":599},[3952],{"type":419,"value":2131},{"type":414,"tag":454,"props":3954,"children":3955},{"style":467},[3956],{"type":419,"value":845},{"type":414,"tag":454,"props":3958,"children":3959},{"style":467},[3960],{"type":419,"value":1516},{"type":414,"tag":454,"props":3962,"children":3963},{"style":467},[3964],{"type":419,"value":1045},{"type":414,"tag":454,"props":3966,"children":3967},{"style":599},[3968],{"type":419,"value":2177},{"type":414,"tag":454,"props":3970,"children":3971},{"style":467},[3972],{"type":419,"value":845},{"type":414,"tag":454,"props":3974,"children":3975},{"style":467},[3976],{"type":419,"value":1516},{"type":414,"tag":454,"props":3978,"children":3979},{"style":467},[3980],{"type":419,"value":1045},{"type":414,"tag":454,"props":3982,"children":3983},{"style":599},[3984],{"type":419,"value":2223},{"type":414,"tag":454,"props":3986,"children":3987},{"style":467},[3988],{"type":419,"value":845},{"type":414,"tag":454,"props":3990,"children":3991},{"style":467},[3992],{"type":419,"value":1516},{"type":414,"tag":454,"props":3994,"children":3995},{"style":467},[3996],{"type":419,"value":1045},{"type":414,"tag":454,"props":3998,"children":3999},{"style":599},[4000],{"type":419,"value":2256},{"type":414,"tag":454,"props":4002,"children":4003},{"style":467},[4004],{"type":419,"value":845},{"type":414,"tag":454,"props":4006,"children":4007},{"style":467},[4008],{"type":419,"value":3740},{"type":414,"tag":415,"props":4010,"children":4011},{},[4012],{"type":419,"value":4013},"The last C# 12 thing we could do in this example is to take advantage of the new class (and structs) primary constructors that were previously limited to records.",{"type":414,"tag":415,"props":4015,"children":4016},{},[4017,4018,4023],{"type":419,"value":788},{"type":414,"tag":450,"props":4019,"children":4021},{"className":4020},[],[4022],{"type":419,"value":1081},{"type":419,"value":4024}," class could become the following:",{"type":414,"tag":444,"props":4026,"children":4028},{"className":799,"code":4027,"language":326,"meta":401,"style":401},"namespace WeatherApi;\n\npublic class WeatherForecast(DateOnly date, int temperatureC, string? summary)\n{\n    public int TemperatureC { get; } = temperatureC;\n    \n    public DateOnly Date { get; } = date;\n    \n    public string? Summary { get; } = summary;\n    \n    public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);\n}\n",[4029],{"type":414,"tag":450,"props":4030,"children":4031},{"__ignoreMap":401},[4032,4049,4056,4122,4129,4176,4184,4228,4235,4283,4290,4344],{"type":414,"tag":454,"props":4033,"children":4034},{"class":456,"line":457},[4035,4040,4045],{"type":414,"tag":454,"props":4036,"children":4037},{"style":815},[4038],{"type":419,"value":4039},"namespace",{"type":414,"tag":454,"props":4041,"children":4042},{"style":461},[4043],{"type":419,"value":4044}," WeatherApi",{"type":414,"tag":454,"props":4046,"children":4047},{"style":467},[4048],{"type":419,"value":925},{"type":414,"tag":454,"props":4050,"children":4051},{"class":456,"line":605},[4052],{"type":414,"tag":454,"props":4053,"children":4054},{"emptyLinePlaceholder":609},[4055],{"type":419,"value":612},{"type":414,"tag":454,"props":4057,"children":4058},{"class":456,"line":615},[4059,4063,4067,4072,4076,4081,4086,4090,4095,4100,4104,4108,4113,4118],{"type":414,"tag":454,"props":4060,"children":4061},{"style":865},[4062],{"type":419,"value":868},{"type":414,"tag":454,"props":4064,"children":4065},{"style":815},[4066],{"type":419,"value":873},{"type":414,"tag":454,"props":4068,"children":4069},{"style":815},[4070],{"type":419,"value":4071}," WeatherForecast",{"type":414,"tag":454,"props":4073,"children":4074},{"style":467},[4075],{"type":419,"value":840},{"type":414,"tag":454,"props":4077,"children":4078},{"style":815},[4079],{"type":419,"value":4080},"DateOnly",{"type":414,"tag":454,"props":4082,"children":4083},{"style":815},[4084],{"type":419,"value":4085}," date",{"type":414,"tag":454,"props":4087,"children":4088},{"style":467},[4089],{"type":419,"value":1516},{"type":414,"tag":454,"props":4091,"children":4092},{"style":467},[4093],{"type":419,"value":4094}," int",{"type":414,"tag":454,"props":4096,"children":4097},{"style":815},[4098],{"type":419,"value":4099}," temperatureC",{"type":414,"tag":454,"props":4101,"children":4102},{"style":467},[4103],{"type":419,"value":1516},{"type":414,"tag":454,"props":4105,"children":4106},{"style":467},[4107],{"type":419,"value":2814},{"type":414,"tag":454,"props":4109,"children":4110},{"style":467},[4111],{"type":419,"value":4112},"?",{"type":414,"tag":454,"props":4114,"children":4115},{"style":815},[4116],{"type":419,"value":4117}," summary",{"type":414,"tag":454,"props":4119,"children":4120},{"style":467},[4121],{"type":419,"value":964},{"type":414,"tag":454,"props":4123,"children":4124},{"class":456,"line":630},[4125],{"type":414,"tag":454,"props":4126,"children":4127},{"style":467},[4128],{"type":419,"value":896},{"type":414,"tag":454,"props":4130,"children":4131},{"class":456,"line":899},[4132,4136,4140,4145,4149,4154,4159,4164,4168,4172],{"type":414,"tag":454,"props":4133,"children":4134},{"style":865},[4135],{"type":419,"value":942},{"type":414,"tag":454,"props":4137,"children":4138},{"style":467},[4139],{"type":419,"value":4094},{"type":414,"tag":454,"props":4141,"children":4142},{"style":815},[4143],{"type":419,"value":4144}," TemperatureC",{"type":414,"tag":454,"props":4146,"children":4147},{"style":467},[4148],{"type":419,"value":3361},{"type":414,"tag":454,"props":4150,"children":4151},{"style":815},[4152],{"type":419,"value":4153}," get",{"type":414,"tag":454,"props":4155,"children":4156},{"style":467},[4157],{"type":419,"value":4158},";",{"type":414,"tag":454,"props":4160,"children":4161},{"style":467},[4162],{"type":419,"value":4163}," }",{"type":414,"tag":454,"props":4165,"children":4166},{"style":467},[4167],{"type":419,"value":1040},{"type":414,"tag":454,"props":4169,"children":4170},{"style":461},[4171],{"type":419,"value":4099},{"type":414,"tag":454,"props":4173,"children":4174},{"style":467},[4175],{"type":419,"value":925},{"type":414,"tag":454,"props":4177,"children":4178},{"class":456,"line":928},[4179],{"type":414,"tag":454,"props":4180,"children":4181},{"style":461},[4182],{"type":419,"value":4183},"    \n",{"type":414,"tag":454,"props":4185,"children":4186},{"class":456,"line":936},[4187,4191,4195,4200,4204,4208,4212,4216,4220,4224],{"type":414,"tag":454,"props":4188,"children":4189},{"style":865},[4190],{"type":419,"value":942},{"type":414,"tag":454,"props":4192,"children":4193},{"style":815},[4194],{"type":419,"value":2389},{"type":414,"tag":454,"props":4196,"children":4197},{"style":815},[4198],{"type":419,"value":4199}," Date",{"type":414,"tag":454,"props":4201,"children":4202},{"style":467},[4203],{"type":419,"value":3361},{"type":414,"tag":454,"props":4205,"children":4206},{"style":815},[4207],{"type":419,"value":4153},{"type":414,"tag":454,"props":4209,"children":4210},{"style":467},[4211],{"type":419,"value":4158},{"type":414,"tag":454,"props":4213,"children":4214},{"style":467},[4215],{"type":419,"value":4163},{"type":414,"tag":454,"props":4217,"children":4218},{"style":467},[4219],{"type":419,"value":1040},{"type":414,"tag":454,"props":4221,"children":4222},{"style":461},[4223],{"type":419,"value":4085},{"type":414,"tag":454,"props":4225,"children":4226},{"style":467},[4227],{"type":419,"value":925},{"type":414,"tag":454,"props":4229,"children":4230},{"class":456,"line":967},[4231],{"type":414,"tag":454,"props":4232,"children":4233},{"style":461},[4234],{"type":419,"value":4183},{"type":414,"tag":454,"props":4236,"children":4237},{"class":456,"line":976},[4238,4242,4246,4250,4255,4259,4263,4267,4271,4275,4279],{"type":414,"tag":454,"props":4239,"children":4240},{"style":865},[4241],{"type":419,"value":942},{"type":414,"tag":454,"props":4243,"children":4244},{"style":467},[4245],{"type":419,"value":2814},{"type":414,"tag":454,"props":4247,"children":4248},{"style":467},[4249],{"type":419,"value":4112},{"type":414,"tag":454,"props":4251,"children":4252},{"style":815},[4253],{"type":419,"value":4254}," Summary",{"type":414,"tag":454,"props":4256,"children":4257},{"style":467},[4258],{"type":419,"value":3361},{"type":414,"tag":454,"props":4260,"children":4261},{"style":815},[4262],{"type":419,"value":4153},{"type":414,"tag":454,"props":4264,"children":4265},{"style":467},[4266],{"type":419,"value":4158},{"type":414,"tag":454,"props":4268,"children":4269},{"style":467},[4270],{"type":419,"value":4163},{"type":414,"tag":454,"props":4272,"children":4273},{"style":467},[4274],{"type":419,"value":1040},{"type":414,"tag":454,"props":4276,"children":4277},{"style":461},[4278],{"type":419,"value":4117},{"type":414,"tag":454,"props":4280,"children":4281},{"style":467},[4282],{"type":419,"value":925},{"type":414,"tag":454,"props":4284,"children":4285},{"class":456,"line":998},[4286],{"type":414,"tag":454,"props":4287,"children":4288},{"style":461},[4289],{"type":419,"value":4183},{"type":414,"tag":454,"props":4291,"children":4292},{"class":456,"line":1007},[4293,4297,4301,4306,4310,4315,4320,4325,4330,4335,4340],{"type":414,"tag":454,"props":4294,"children":4295},{"style":865},[4296],{"type":419,"value":942},{"type":414,"tag":454,"props":4298,"children":4299},{"style":467},[4300],{"type":419,"value":4094},{"type":414,"tag":454,"props":4302,"children":4303},{"style":815},[4304],{"type":419,"value":4305}," TemperatureF",{"type":414,"tag":454,"props":4307,"children":4308},{"style":467},[4309],{"type":419,"value":1842},{"type":414,"tag":454,"props":4311,"children":4312},{"style":478},[4313],{"type":419,"value":4314}," 32",{"type":414,"tag":454,"props":4316,"children":4317},{"style":467},[4318],{"type":419,"value":4319}," +",{"type":414,"tag":454,"props":4321,"children":4322},{"style":467},[4323],{"type":419,"value":4324}," (int)(",{"type":414,"tag":454,"props":4326,"children":4327},{"style":461},[4328],{"type":419,"value":4329},"TemperatureC ",{"type":414,"tag":454,"props":4331,"children":4332},{"style":467},[4333],{"type":419,"value":4334},"/",{"type":414,"tag":454,"props":4336,"children":4337},{"style":478},[4338],{"type":419,"value":4339}," 0.5556",{"type":414,"tag":454,"props":4341,"children":4342},{"style":467},[4343],{"type":419,"value":1567},{"type":414,"tag":454,"props":4345,"children":4346},{"class":456,"line":1015},[4347],{"type":414,"tag":454,"props":4348,"children":4349},{"style":467},[4350],{"type":419,"value":1193},{"type":414,"tag":540,"props":4352,"children":4354},{"icon":4353},"i-heroicons-chat-bubble-left-20-solid",[4355],{"type":414,"tag":415,"props":4356,"children":4357},{},[4358],{"type":419,"value":4359},"I'm not sure this is completely relevant here, a record would probably be better but you get the idea.",{"type":414,"tag":415,"props":4361,"children":4362},{},[4363,4365,4371],{"type":419,"value":4364},"You can use primary constructors in any class, it will work as well with dependency injection. However, be aware that the services you used to assign to a private read-only field of your class won't be read-only anymore like ",{"type":414,"tag":450,"props":4366,"children":4368},{"className":4367},[],[4369],{"type":419,"value":4370},"weatherService",{"type":419,"value":4372}," in this example:",{"type":414,"tag":444,"props":4374,"children":4376},{"className":799,"code":4375,"language":326,"meta":401,"style":401},"public class WeatherForecastController(IWeatherService weatherService, ILogger\u003CWeatherForecastController> logger) : ControllerBase\n{\n    [HttpGet(Name = \"GetWeatherForecast\")]\n    [ProducesResponseType(typeof(WeatherForecast), StatusCodes.Status200OK)]\n    public Task\u003CWeatherForecast[]> Get()\n    {\n        return weatherService.GetWeatherForecasts();\n    }\n}\n",[4377],{"type":414,"tag":450,"props":4378,"children":4379},{"__ignoreMap":401},[4380,4445,4452,4491,4530,4561,4568,4591,4598],{"type":414,"tag":454,"props":4381,"children":4382},{"class":456,"line":457},[4383,4387,4391,4395,4399,4403,4407,4411,4416,4420,4424,4428,4433,4437,4441],{"type":414,"tag":454,"props":4384,"children":4385},{"style":865},[4386],{"type":419,"value":868},{"type":414,"tag":454,"props":4388,"children":4389},{"style":815},[4390],{"type":419,"value":873},{"type":414,"tag":454,"props":4392,"children":4393},{"style":815},[4394],{"type":419,"value":878},{"type":414,"tag":454,"props":4396,"children":4397},{"style":467},[4398],{"type":419,"value":840},{"type":414,"tag":454,"props":4400,"children":4401},{"style":815},[4402],{"type":419,"value":746},{"type":414,"tag":454,"props":4404,"children":4405},{"style":815},[4406],{"type":419,"value":959},{"type":414,"tag":454,"props":4408,"children":4409},{"style":467},[4410],{"type":419,"value":1516},{"type":414,"tag":454,"props":4412,"children":4413},{"style":815},[4414],{"type":419,"value":4415}," ILogger",{"type":414,"tag":454,"props":4417,"children":4418},{"style":467},[4419],{"type":419,"value":1122},{"type":414,"tag":454,"props":4421,"children":4422},{"style":815},[4423],{"type":419,"value":794},{"type":414,"tag":454,"props":4425,"children":4426},{"style":467},[4427],{"type":419,"value":1291},{"type":414,"tag":454,"props":4429,"children":4430},{"style":815},[4431],{"type":419,"value":4432}," logger",{"type":414,"tag":454,"props":4434,"children":4435},{"style":467},[4436],{"type":419,"value":668},{"type":414,"tag":454,"props":4438,"children":4439},{"style":467},[4440],{"type":419,"value":883},{"type":414,"tag":454,"props":4442,"children":4443},{"style":815},[4444],{"type":419,"value":888},{"type":414,"tag":454,"props":4446,"children":4447},{"class":456,"line":605},[4448],{"type":414,"tag":454,"props":4449,"children":4450},{"style":467},[4451],{"type":419,"value":896},{"type":414,"tag":454,"props":4453,"children":4454},{"class":456,"line":615},[4455,4459,4463,4467,4471,4475,4479,4483,4487],{"type":414,"tag":454,"props":4456,"children":4457},{"style":467},[4458],{"type":419,"value":1021},{"type":414,"tag":454,"props":4460,"children":4461},{"style":815},[4462],{"type":419,"value":1026},{"type":414,"tag":454,"props":4464,"children":4465},{"style":467},[4466],{"type":419,"value":840},{"type":414,"tag":454,"props":4468,"children":4469},{"style":815},[4470],{"type":419,"value":1035},{"type":414,"tag":454,"props":4472,"children":4473},{"style":467},[4474],{"type":419,"value":1040},{"type":414,"tag":454,"props":4476,"children":4477},{"style":467},[4478],{"type":419,"value":1045},{"type":414,"tag":454,"props":4480,"children":4481},{"style":599},[4482],{"type":419,"value":1050},{"type":414,"tag":454,"props":4484,"children":4485},{"style":467},[4486],{"type":419,"value":845},{"type":414,"tag":454,"props":4488,"children":4489},{"style":467},[4490],{"type":419,"value":859},{"type":414,"tag":454,"props":4492,"children":4493},{"class":456,"line":630},[4494,4498,4502,4506,4510,4514,4518,4522,4526],{"type":414,"tag":454,"props":4495,"children":4496},{"style":467},[4497],{"type":419,"value":1021},{"type":414,"tag":454,"props":4499,"children":4500},{"style":815},[4501],{"type":419,"value":1071},{"type":414,"tag":454,"props":4503,"children":4504},{"style":467},[4505],{"type":419,"value":1076},{"type":414,"tag":454,"props":4507,"children":4508},{"style":815},[4509],{"type":419,"value":1081},{"type":414,"tag":454,"props":4511,"children":4512},{"style":467},[4513],{"type":419,"value":1086},{"type":414,"tag":454,"props":4515,"children":4516},{"style":461},[4517],{"type":419,"value":1091},{"type":414,"tag":454,"props":4519,"children":4520},{"style":467},[4521],{"type":419,"value":705},{"type":414,"tag":454,"props":4523,"children":4524},{"style":461},[4525],{"type":419,"value":1100},{"type":414,"tag":454,"props":4527,"children":4528},{"style":467},[4529],{"type":419,"value":859},{"type":414,"tag":454,"props":4531,"children":4532},{"class":456,"line":899},[4533,4537,4541,4545,4549,4553,4557],{"type":414,"tag":454,"props":4534,"children":4535},{"style":865},[4536],{"type":419,"value":942},{"type":414,"tag":454,"props":4538,"children":4539},{"style":815},[4540],{"type":419,"value":1117},{"type":414,"tag":454,"props":4542,"children":4543},{"style":467},[4544],{"type":419,"value":1122},{"type":414,"tag":454,"props":4546,"children":4547},{"style":815},[4548],{"type":419,"value":1081},{"type":414,"tag":454,"props":4550,"children":4551},{"style":467},[4552],{"type":419,"value":1131},{"type":414,"tag":454,"props":4554,"children":4555},{"style":525},[4556],{"type":419,"value":1136},{"type":414,"tag":454,"props":4558,"children":4559},{"style":467},[4560],{"type":419,"value":1141},{"type":414,"tag":454,"props":4562,"children":4563},{"class":456,"line":928},[4564],{"type":414,"tag":454,"props":4565,"children":4566},{"style":467},[4567],{"type":419,"value":973},{"type":414,"tag":454,"props":4569,"children":4570},{"class":456,"line":936},[4571,4575,4579,4583,4587],{"type":414,"tag":454,"props":4572,"children":4573},{"style":619},[4574],{"type":419,"value":1158},{"type":414,"tag":454,"props":4576,"children":4577},{"style":461},[4578],{"type":419,"value":959},{"type":414,"tag":454,"props":4580,"children":4581},{"style":467},[4582],{"type":419,"value":705},{"type":414,"tag":454,"props":4584,"children":4585},{"style":525},[4586],{"type":419,"value":1171},{"type":414,"tag":454,"props":4588,"children":4589},{"style":467},[4590],{"type":419,"value":1176},{"type":414,"tag":454,"props":4592,"children":4593},{"class":456,"line":967},[4594],{"type":414,"tag":454,"props":4595,"children":4596},{"style":467},[4597],{"type":419,"value":1004},{"type":414,"tag":454,"props":4599,"children":4600},{"class":456,"line":976},[4601],{"type":414,"tag":454,"props":4602,"children":4603},{"style":467},[4604],{"type":419,"value":1193},{"type":414,"tag":415,"props":4606,"children":4607},{},[4608,4610,4615,4617,4623,4625,4632],{"type":419,"value":4609},"Having 2 different implementations of the ",{"type":414,"tag":450,"props":4611,"children":4613},{"className":4612},[],[4614],{"type":419,"value":746},{"type":419,"value":4616}," is great, but what if you need one of them in some part of your code? The one you will have injected in your class is the last one registered in the DI container, but that may not be the one you want. You could get all of them by injecting ",{"type":414,"tag":450,"props":4618,"children":4620},{"className":4619},[],[4621],{"type":419,"value":4622},"IEnumerable\u003CIWeatherService>",{"type":419,"value":4624}," and selecting the one you need. You could also create a sort of factory to retrieve the correct instance. Yet in .NET 8, you don't need to worry about all that because you have the ",{"type":414,"tag":433,"props":4626,"children":4629},{"href":4627,"rel":4628},"https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8#keyed-di-services",[437],[4630],{"type":419,"value":4631},"keyed DI Services",{"type":419,"value":705},{"type":414,"tag":415,"props":4634,"children":4635},{},[4636],{"type":419,"value":4637},"Specifying a key (that can be anything, not necessarily a string) is done when registering the services in the DI container.",{"type":414,"tag":444,"props":4639,"children":4641},{"className":799,"code":4640,"language":326,"meta":401,"style":401},"builder.Services.AddKeyedTransient\u003CIWeatherService, RandomWeatherService>(\"random\");\nbuilder.Services.AddKeyedTransient\u003CIWeatherService, OpenWeatherService>(\"api\");\n",[4642],{"type":414,"tag":450,"props":4643,"children":4644},{"__ignoreMap":401},[4645,4710],{"type":414,"tag":454,"props":4646,"children":4647},{"class":456,"line":457},[4648,4653,4657,4662,4666,4671,4675,4679,4683,4688,4693,4697,4702,4706],{"type":414,"tag":454,"props":4649,"children":4650},{"style":461},[4651],{"type":419,"value":4652},"builder",{"type":414,"tag":454,"props":4654,"children":4655},{"style":467},[4656],{"type":419,"value":705},{"type":414,"tag":454,"props":4658,"children":4659},{"style":461},[4660],{"type":419,"value":4661},"Services",{"type":414,"tag":454,"props":4663,"children":4664},{"style":467},[4665],{"type":419,"value":705},{"type":414,"tag":454,"props":4667,"children":4668},{"style":525},[4669],{"type":419,"value":4670},"AddKeyedTransient",{"type":414,"tag":454,"props":4672,"children":4673},{"style":467},[4674],{"type":419,"value":1122},{"type":414,"tag":454,"props":4676,"children":4677},{"style":815},[4678],{"type":419,"value":746},{"type":414,"tag":454,"props":4680,"children":4681},{"style":467},[4682],{"type":419,"value":1516},{"type":414,"tag":454,"props":4684,"children":4685},{"style":815},[4686],{"type":419,"value":4687}," RandomWeatherService",{"type":414,"tag":454,"props":4689,"children":4690},{"style":467},[4691],{"type":419,"value":4692},">(",{"type":414,"tag":454,"props":4694,"children":4695},{"style":467},[4696],{"type":419,"value":845},{"type":414,"tag":454,"props":4698,"children":4699},{"style":599},[4700],{"type":419,"value":4701},"random",{"type":414,"tag":454,"props":4703,"children":4704},{"style":467},[4705],{"type":419,"value":845},{"type":414,"tag":454,"props":4707,"children":4708},{"style":467},[4709],{"type":419,"value":1567},{"type":414,"tag":454,"props":4711,"children":4712},{"class":456,"line":605},[4713,4717,4721,4725,4729,4733,4737,4741,4745,4749,4753,4757,4762,4766],{"type":414,"tag":454,"props":4714,"children":4715},{"style":461},[4716],{"type":419,"value":4652},{"type":414,"tag":454,"props":4718,"children":4719},{"style":467},[4720],{"type":419,"value":705},{"type":414,"tag":454,"props":4722,"children":4723},{"style":461},[4724],{"type":419,"value":4661},{"type":414,"tag":454,"props":4726,"children":4727},{"style":467},[4728],{"type":419,"value":705},{"type":414,"tag":454,"props":4730,"children":4731},{"style":525},[4732],{"type":419,"value":4670},{"type":414,"tag":454,"props":4734,"children":4735},{"style":467},[4736],{"type":419,"value":1122},{"type":414,"tag":454,"props":4738,"children":4739},{"style":815},[4740],{"type":419,"value":746},{"type":414,"tag":454,"props":4742,"children":4743},{"style":467},[4744],{"type":419,"value":1516},{"type":414,"tag":454,"props":4746,"children":4747},{"style":815},[4748],{"type":419,"value":1444},{"type":414,"tag":454,"props":4750,"children":4751},{"style":467},[4752],{"type":419,"value":4692},{"type":414,"tag":454,"props":4754,"children":4755},{"style":467},[4756],{"type":419,"value":845},{"type":414,"tag":454,"props":4758,"children":4759},{"style":599},[4760],{"type":419,"value":4761},"api",{"type":414,"tag":454,"props":4763,"children":4764},{"style":467},[4765],{"type":419,"value":845},{"type":414,"tag":454,"props":4767,"children":4768},{"style":467},[4769],{"type":419,"value":1567},{"type":414,"tag":415,"props":4771,"children":4772},{},[4773],{"type":419,"value":4774},"With this key, retrieving a specific implementation becomes easy.",{"type":414,"tag":444,"props":4776,"children":4778},{"className":799,"code":4777,"language":326,"meta":401,"style":401},"    public WeatherForecastController([FromKeyedServices(\"random\")] IWeatherService weatherService, ILogger\u003CWeatherForecastController> logger)\n    {\n        _logger = logger;\n        _weatherService = weatherService;\n    }\n",[4779],{"type":414,"tag":450,"props":4780,"children":4781},{"__ignoreMap":401},[4782,4857,4864,4884,4903],{"type":414,"tag":454,"props":4783,"children":4784},{"class":456,"line":457},[4785,4789,4793,4798,4803,4807,4811,4815,4819,4824,4829,4833,4837,4841,4845,4849,4853],{"type":414,"tag":454,"props":4786,"children":4787},{"style":865},[4788],{"type":419,"value":942},{"type":414,"tag":454,"props":4790,"children":4791},{"style":525},[4792],{"type":419,"value":878},{"type":414,"tag":454,"props":4794,"children":4795},{"style":467},[4796],{"type":419,"value":4797},"([",{"type":414,"tag":454,"props":4799,"children":4800},{"style":525},[4801],{"type":419,"value":4802},"FromKeyedServices",{"type":414,"tag":454,"props":4804,"children":4805},{"style":467},[4806],{"type":419,"value":840},{"type":414,"tag":454,"props":4808,"children":4809},{"style":467},[4810],{"type":419,"value":845},{"type":414,"tag":454,"props":4812,"children":4813},{"style":599},[4814],{"type":419,"value":4701},{"type":414,"tag":454,"props":4816,"children":4817},{"style":467},[4818],{"type":419,"value":845},{"type":414,"tag":454,"props":4820,"children":4821},{"style":467},[4822],{"type":419,"value":4823},")]",{"type":414,"tag":454,"props":4825,"children":4826},{"style":461},[4827],{"type":419,"value":4828}," IWeatherService weatherService",{"type":414,"tag":454,"props":4830,"children":4831},{"style":467},[4832],{"type":419,"value":1516},{"type":414,"tag":454,"props":4834,"children":4835},{"style":461},[4836],{"type":419,"value":4415},{"type":414,"tag":454,"props":4838,"children":4839},{"style":467},[4840],{"type":419,"value":1122},{"type":414,"tag":454,"props":4842,"children":4843},{"style":461},[4844],{"type":419,"value":794},{"type":414,"tag":454,"props":4846,"children":4847},{"style":467},[4848],{"type":419,"value":1291},{"type":414,"tag":454,"props":4850,"children":4851},{"style":461},[4852],{"type":419,"value":4432},{"type":414,"tag":454,"props":4854,"children":4855},{"style":467},[4856],{"type":419,"value":964},{"type":414,"tag":454,"props":4858,"children":4859},{"class":456,"line":605},[4860],{"type":414,"tag":454,"props":4861,"children":4862},{"style":467},[4863],{"type":419,"value":973},{"type":414,"tag":454,"props":4865,"children":4866},{"class":456,"line":615},[4867,4872,4876,4880],{"type":414,"tag":454,"props":4868,"children":4869},{"style":461},[4870],{"type":419,"value":4871},"        _logger ",{"type":414,"tag":454,"props":4873,"children":4874},{"style":467},[4875],{"type":419,"value":987},{"type":414,"tag":454,"props":4877,"children":4878},{"style":461},[4879],{"type":419,"value":4432},{"type":414,"tag":454,"props":4881,"children":4882},{"style":467},[4883],{"type":419,"value":925},{"type":414,"tag":454,"props":4885,"children":4886},{"class":456,"line":630},[4887,4891,4895,4899],{"type":414,"tag":454,"props":4888,"children":4889},{"style":461},[4890],{"type":419,"value":982},{"type":414,"tag":454,"props":4892,"children":4893},{"style":467},[4894],{"type":419,"value":987},{"type":414,"tag":454,"props":4896,"children":4897},{"style":461},[4898],{"type":419,"value":959},{"type":414,"tag":454,"props":4900,"children":4901},{"style":467},[4902],{"type":419,"value":925},{"type":414,"tag":454,"props":4904,"children":4905},{"class":456,"line":899},[4906],{"type":414,"tag":454,"props":4907,"children":4908},{"style":467},[4909],{"type":419,"value":1004},{"type":414,"tag":415,"props":4911,"children":4912},{},[4913,4915,4922],{"type":419,"value":4914},"I did not discuss the code that requests the Open Weather Map API. It's quite simple thanks to the uses of ",{"type":414,"tag":433,"props":4916,"children":4919},{"href":4917,"rel":4918},"https://github.com/reactiveui/refit",[437],[4920],{"type":419,"value":4921},"Refit",{"type":419,"value":705},{"type":414,"tag":444,"props":4924,"children":4926},{"className":799,"code":4925,"language":326,"meta":401,"style":401},"using Refit;\n\nnamespace WeatherApi.Services.OpenWeatherMap;\n\npublic interface IOpenWeatherMapApi\n{\n    [Get(\"/forecast?lat={latitude}&lon={longitude}&units=metric\")]\n    Task\u003CWeatherMapResponse> GetWeatherForecast(double latitude, double longitude);\n}\n\npublic record WeatherMapResponse(IList\u003CWeatherMapForecast> List);\n\npublic record WeatherMapForecast(int Dt, WeatherMapMain Main);\n\npublic record WeatherMapMain(double Temp);\n",[4927],{"type":414,"tag":450,"props":4928,"children":4929},{"__ignoreMap":401},[4930,4946,4953,4985,4992,5009,5016,5049,5102,5109,5116,5164,5171,5215,5222],{"type":414,"tag":454,"props":4931,"children":4932},{"class":456,"line":457},[4933,4937,4942],{"type":414,"tag":454,"props":4934,"children":4935},{"style":478},[4936],{"type":419,"value":2612},{"type":414,"tag":454,"props":4938,"children":4939},{"style":461},[4940],{"type":419,"value":4941}," Refit",{"type":414,"tag":454,"props":4943,"children":4944},{"style":467},[4945],{"type":419,"value":925},{"type":414,"tag":454,"props":4947,"children":4948},{"class":456,"line":605},[4949],{"type":414,"tag":454,"props":4950,"children":4951},{"emptyLinePlaceholder":609},[4952],{"type":419,"value":612},{"type":414,"tag":454,"props":4954,"children":4955},{"class":456,"line":615},[4956,4960,4964,4968,4972,4976,4981],{"type":414,"tag":454,"props":4957,"children":4958},{"style":815},[4959],{"type":419,"value":4039},{"type":414,"tag":454,"props":4961,"children":4962},{"style":461},[4963],{"type":419,"value":4044},{"type":414,"tag":454,"props":4965,"children":4966},{"style":467},[4967],{"type":419,"value":705},{"type":414,"tag":454,"props":4969,"children":4970},{"style":461},[4971],{"type":419,"value":4661},{"type":414,"tag":454,"props":4973,"children":4974},{"style":467},[4975],{"type":419,"value":705},{"type":414,"tag":454,"props":4977,"children":4978},{"style":461},[4979],{"type":419,"value":4980},"OpenWeatherMap",{"type":414,"tag":454,"props":4982,"children":4983},{"style":467},[4984],{"type":419,"value":925},{"type":414,"tag":454,"props":4986,"children":4987},{"class":456,"line":630},[4988],{"type":414,"tag":454,"props":4989,"children":4990},{"emptyLinePlaceholder":609},[4991],{"type":419,"value":612},{"type":414,"tag":454,"props":4993,"children":4994},{"class":456,"line":899},[4995,4999,5004],{"type":414,"tag":454,"props":4996,"children":4997},{"style":865},[4998],{"type":419,"value":868},{"type":414,"tag":454,"props":5000,"children":5001},{"style":815},[5002],{"type":419,"value":5003}," interface",{"type":414,"tag":454,"props":5005,"children":5006},{"style":815},[5007],{"type":419,"value":5008}," IOpenWeatherMapApi\n",{"type":414,"tag":454,"props":5010,"children":5011},{"class":456,"line":928},[5012],{"type":414,"tag":454,"props":5013,"children":5014},{"style":467},[5015],{"type":419,"value":896},{"type":414,"tag":454,"props":5017,"children":5018},{"class":456,"line":936},[5019,5023,5028,5032,5036,5041,5045],{"type":414,"tag":454,"props":5020,"children":5021},{"style":467},[5022],{"type":419,"value":1021},{"type":414,"tag":454,"props":5024,"children":5025},{"style":815},[5026],{"type":419,"value":5027},"Get",{"type":414,"tag":454,"props":5029,"children":5030},{"style":467},[5031],{"type":419,"value":840},{"type":414,"tag":454,"props":5033,"children":5034},{"style":467},[5035],{"type":419,"value":845},{"type":414,"tag":454,"props":5037,"children":5038},{"style":599},[5039],{"type":419,"value":5040},"/forecast?lat={latitude}&lon={longitude}&units=metric",{"type":414,"tag":454,"props":5042,"children":5043},{"style":467},[5044],{"type":419,"value":845},{"type":414,"tag":454,"props":5046,"children":5047},{"style":467},[5048],{"type":419,"value":859},{"type":414,"tag":454,"props":5050,"children":5051},{"class":456,"line":967},[5052,5057,5061,5066,5070,5075,5080,5085,5089,5093,5098],{"type":414,"tag":454,"props":5053,"children":5054},{"style":815},[5055],{"type":419,"value":5056},"    Task",{"type":414,"tag":454,"props":5058,"children":5059},{"style":467},[5060],{"type":419,"value":1122},{"type":414,"tag":454,"props":5062,"children":5063},{"style":815},[5064],{"type":419,"value":5065},"WeatherMapResponse",{"type":414,"tag":454,"props":5067,"children":5068},{"style":467},[5069],{"type":419,"value":1291},{"type":414,"tag":454,"props":5071,"children":5072},{"style":525},[5073],{"type":419,"value":5074}," GetWeatherForecast",{"type":414,"tag":454,"props":5076,"children":5077},{"style":467},[5078],{"type":419,"value":5079},"(double",{"type":414,"tag":454,"props":5081,"children":5082},{"style":815},[5083],{"type":419,"value":5084}," latitude",{"type":414,"tag":454,"props":5086,"children":5087},{"style":467},[5088],{"type":419,"value":1516},{"type":414,"tag":454,"props":5090,"children":5091},{"style":467},[5092],{"type":419,"value":1521},{"type":414,"tag":454,"props":5094,"children":5095},{"style":815},[5096],{"type":419,"value":5097}," longitude",{"type":414,"tag":454,"props":5099,"children":5100},{"style":467},[5101],{"type":419,"value":1567},{"type":414,"tag":454,"props":5103,"children":5104},{"class":456,"line":976},[5105],{"type":414,"tag":454,"props":5106,"children":5107},{"style":467},[5108],{"type":419,"value":1193},{"type":414,"tag":454,"props":5110,"children":5111},{"class":456,"line":998},[5112],{"type":414,"tag":454,"props":5113,"children":5114},{"emptyLinePlaceholder":609},[5115],{"type":419,"value":612},{"type":414,"tag":454,"props":5117,"children":5118},{"class":456,"line":1007},[5119,5123,5128,5133,5137,5142,5146,5151,5155,5160],{"type":414,"tag":454,"props":5120,"children":5121},{"style":865},[5122],{"type":419,"value":868},{"type":414,"tag":454,"props":5124,"children":5125},{"style":815},[5126],{"type":419,"value":5127}," record",{"type":414,"tag":454,"props":5129,"children":5130},{"style":815},[5131],{"type":419,"value":5132}," WeatherMapResponse",{"type":414,"tag":454,"props":5134,"children":5135},{"style":467},[5136],{"type":419,"value":840},{"type":414,"tag":454,"props":5138,"children":5139},{"style":815},[5140],{"type":419,"value":5141},"IList",{"type":414,"tag":454,"props":5143,"children":5144},{"style":467},[5145],{"type":419,"value":1122},{"type":414,"tag":454,"props":5147,"children":5148},{"style":815},[5149],{"type":419,"value":5150},"WeatherMapForecast",{"type":414,"tag":454,"props":5152,"children":5153},{"style":467},[5154],{"type":419,"value":1291},{"type":414,"tag":454,"props":5156,"children":5157},{"style":815},[5158],{"type":419,"value":5159}," List",{"type":414,"tag":454,"props":5161,"children":5162},{"style":467},[5163],{"type":419,"value":1567},{"type":414,"tag":454,"props":5165,"children":5166},{"class":456,"line":1015},[5167],{"type":414,"tag":454,"props":5168,"children":5169},{"emptyLinePlaceholder":609},[5170],{"type":419,"value":612},{"type":414,"tag":454,"props":5172,"children":5173},{"class":456,"line":1061},[5174,5178,5182,5187,5192,5197,5201,5206,5211],{"type":414,"tag":454,"props":5175,"children":5176},{"style":865},[5177],{"type":419,"value":868},{"type":414,"tag":454,"props":5179,"children":5180},{"style":815},[5181],{"type":419,"value":5127},{"type":414,"tag":454,"props":5183,"children":5184},{"style":815},[5185],{"type":419,"value":5186}," WeatherMapForecast",{"type":414,"tag":454,"props":5188,"children":5189},{"style":467},[5190],{"type":419,"value":5191},"(int",{"type":414,"tag":454,"props":5193,"children":5194},{"style":815},[5195],{"type":419,"value":5196}," Dt",{"type":414,"tag":454,"props":5198,"children":5199},{"style":467},[5200],{"type":419,"value":1516},{"type":414,"tag":454,"props":5202,"children":5203},{"style":815},[5204],{"type":419,"value":5205}," WeatherMapMain",{"type":414,"tag":454,"props":5207,"children":5208},{"style":815},[5209],{"type":419,"value":5210}," Main",{"type":414,"tag":454,"props":5212,"children":5213},{"style":467},[5214],{"type":419,"value":1567},{"type":414,"tag":454,"props":5216,"children":5217},{"class":456,"line":1107},[5218],{"type":414,"tag":454,"props":5219,"children":5220},{"emptyLinePlaceholder":609},[5221],{"type":419,"value":612},{"type":414,"tag":454,"props":5223,"children":5224},{"class":456,"line":1144},[5225,5229,5233,5237,5241,5246],{"type":414,"tag":454,"props":5226,"children":5227},{"style":865},[5228],{"type":419,"value":868},{"type":414,"tag":454,"props":5230,"children":5231},{"style":815},[5232],{"type":419,"value":5127},{"type":414,"tag":454,"props":5234,"children":5235},{"style":815},[5236],{"type":419,"value":5205},{"type":414,"tag":454,"props":5238,"children":5239},{"style":467},[5240],{"type":419,"value":5079},{"type":414,"tag":454,"props":5242,"children":5243},{"style":815},[5244],{"type":419,"value":5245}," Temp",{"type":414,"tag":454,"props":5247,"children":5248},{"style":467},[5249],{"type":419,"value":1567},{"type":414,"tag":415,"props":5251,"children":5252},{},[5253,5255,5261],{"type":419,"value":5254},"I created an HTTP Message Handler to take care of adding the Open Weather Map API key to the requests. This API key and the URL to the API come from the configuration and are mapped to a configuration object ",{"type":414,"tag":450,"props":5256,"children":5258},{"className":5257},[],[5259],{"type":419,"value":5260},"WeatherMapConfiguration",{"type":419,"value":705},{"type":414,"tag":415,"props":5263,"children":5264},{},[5265,5267,5274,5276,5283],{"type":419,"value":5266},"In .NET 8, we can use ",{"type":414,"tag":433,"props":5268,"children":5271},{"href":5269,"rel":5270},"https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8#data-validation",[437],[5272],{"type":419,"value":5273},"data validation attributes",{"type":419,"value":5275}," for data like configuration options. There is also a ",{"type":414,"tag":433,"props":5277,"children":5280},{"href":5278,"rel":5279},"https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8#options-validation",[437],[5281],{"type":419,"value":5282},"source code generator",{"type":419,"value":5284}," that can implement the validation logic:",{"type":414,"tag":444,"props":5286,"children":5288},{"className":799,"code":5287,"language":326,"meta":401,"style":401},"namespace WeatherApi.Services.OpenWeatherMap;\n\npublic class WeatherMapConfiguration\n{\n    [Required]\n    public required string ApiKey { get; init; }\n\n    [Required]\n    [Url]\n    public required string Uri { get; init; }\n    \n}\n\n[OptionsValidator]\npublic partial class WeatherMapConfigurationValidator : IValidateOptions\u003CWeatherMapConfiguration>\n{\n}\n",[5289],{"type":414,"tag":450,"props":5290,"children":5291},{"__ignoreMap":401},[5292,5323,5330,5346,5353,5369,5416,5423,5438,5454,5498,5505,5512,5519,5535,5578,5585],{"type":414,"tag":454,"props":5293,"children":5294},{"class":456,"line":457},[5295,5299,5303,5307,5311,5315,5319],{"type":414,"tag":454,"props":5296,"children":5297},{"style":815},[5298],{"type":419,"value":4039},{"type":414,"tag":454,"props":5300,"children":5301},{"style":461},[5302],{"type":419,"value":4044},{"type":414,"tag":454,"props":5304,"children":5305},{"style":467},[5306],{"type":419,"value":705},{"type":414,"tag":454,"props":5308,"children":5309},{"style":461},[5310],{"type":419,"value":4661},{"type":414,"tag":454,"props":5312,"children":5313},{"style":467},[5314],{"type":419,"value":705},{"type":414,"tag":454,"props":5316,"children":5317},{"style":461},[5318],{"type":419,"value":4980},{"type":414,"tag":454,"props":5320,"children":5321},{"style":467},[5322],{"type":419,"value":925},{"type":414,"tag":454,"props":5324,"children":5325},{"class":456,"line":605},[5326],{"type":414,"tag":454,"props":5327,"children":5328},{"emptyLinePlaceholder":609},[5329],{"type":419,"value":612},{"type":414,"tag":454,"props":5331,"children":5332},{"class":456,"line":615},[5333,5337,5341],{"type":414,"tag":454,"props":5334,"children":5335},{"style":865},[5336],{"type":419,"value":868},{"type":414,"tag":454,"props":5338,"children":5339},{"style":815},[5340],{"type":419,"value":873},{"type":414,"tag":454,"props":5342,"children":5343},{"style":815},[5344],{"type":419,"value":5345}," WeatherMapConfiguration\n",{"type":414,"tag":454,"props":5347,"children":5348},{"class":456,"line":630},[5349],{"type":414,"tag":454,"props":5350,"children":5351},{"style":467},[5352],{"type":419,"value":896},{"type":414,"tag":454,"props":5354,"children":5355},{"class":456,"line":899},[5356,5360,5365],{"type":414,"tag":454,"props":5357,"children":5358},{"style":467},[5359],{"type":419,"value":1021},{"type":414,"tag":454,"props":5361,"children":5362},{"style":815},[5363],{"type":419,"value":5364},"Required",{"type":414,"tag":454,"props":5366,"children":5367},{"style":467},[5368],{"type":419,"value":823},{"type":414,"tag":454,"props":5370,"children":5371},{"class":456,"line":928},[5372,5376,5381,5385,5390,5394,5398,5402,5407,5411],{"type":414,"tag":454,"props":5373,"children":5374},{"style":865},[5375],{"type":419,"value":942},{"type":414,"tag":454,"props":5377,"children":5378},{"style":865},[5379],{"type":419,"value":5380}," required",{"type":414,"tag":454,"props":5382,"children":5383},{"style":467},[5384],{"type":419,"value":2814},{"type":414,"tag":454,"props":5386,"children":5387},{"style":815},[5388],{"type":419,"value":5389}," ApiKey",{"type":414,"tag":454,"props":5391,"children":5392},{"style":467},[5393],{"type":419,"value":3361},{"type":414,"tag":454,"props":5395,"children":5396},{"style":815},[5397],{"type":419,"value":4153},{"type":414,"tag":454,"props":5399,"children":5400},{"style":467},[5401],{"type":419,"value":4158},{"type":414,"tag":454,"props":5403,"children":5404},{"style":815},[5405],{"type":419,"value":5406}," init",{"type":414,"tag":454,"props":5408,"children":5409},{"style":467},[5410],{"type":419,"value":4158},{"type":414,"tag":454,"props":5412,"children":5413},{"style":467},[5414],{"type":419,"value":5415}," }\n",{"type":414,"tag":454,"props":5417,"children":5418},{"class":456,"line":936},[5419],{"type":414,"tag":454,"props":5420,"children":5421},{"emptyLinePlaceholder":609},[5422],{"type":419,"value":612},{"type":414,"tag":454,"props":5424,"children":5425},{"class":456,"line":967},[5426,5430,5434],{"type":414,"tag":454,"props":5427,"children":5428},{"style":467},[5429],{"type":419,"value":1021},{"type":414,"tag":454,"props":5431,"children":5432},{"style":815},[5433],{"type":419,"value":5364},{"type":414,"tag":454,"props":5435,"children":5436},{"style":467},[5437],{"type":419,"value":823},{"type":414,"tag":454,"props":5439,"children":5440},{"class":456,"line":976},[5441,5445,5450],{"type":414,"tag":454,"props":5442,"children":5443},{"style":467},[5444],{"type":419,"value":1021},{"type":414,"tag":454,"props":5446,"children":5447},{"style":815},[5448],{"type":419,"value":5449},"Url",{"type":414,"tag":454,"props":5451,"children":5452},{"style":467},[5453],{"type":419,"value":823},{"type":414,"tag":454,"props":5455,"children":5456},{"class":456,"line":998},[5457,5461,5465,5469,5474,5478,5482,5486,5490,5494],{"type":414,"tag":454,"props":5458,"children":5459},{"style":865},[5460],{"type":419,"value":942},{"type":414,"tag":454,"props":5462,"children":5463},{"style":865},[5464],{"type":419,"value":5380},{"type":414,"tag":454,"props":5466,"children":5467},{"style":467},[5468],{"type":419,"value":2814},{"type":414,"tag":454,"props":5470,"children":5471},{"style":815},[5472],{"type":419,"value":5473}," Uri",{"type":414,"tag":454,"props":5475,"children":5476},{"style":467},[5477],{"type":419,"value":3361},{"type":414,"tag":454,"props":5479,"children":5480},{"style":815},[5481],{"type":419,"value":4153},{"type":414,"tag":454,"props":5483,"children":5484},{"style":467},[5485],{"type":419,"value":4158},{"type":414,"tag":454,"props":5487,"children":5488},{"style":815},[5489],{"type":419,"value":5406},{"type":414,"tag":454,"props":5491,"children":5492},{"style":467},[5493],{"type":419,"value":4158},{"type":414,"tag":454,"props":5495,"children":5496},{"style":467},[5497],{"type":419,"value":5415},{"type":414,"tag":454,"props":5499,"children":5500},{"class":456,"line":1007},[5501],{"type":414,"tag":454,"props":5502,"children":5503},{"style":461},[5504],{"type":419,"value":4183},{"type":414,"tag":454,"props":5506,"children":5507},{"class":456,"line":1015},[5508],{"type":414,"tag":454,"props":5509,"children":5510},{"style":467},[5511],{"type":419,"value":1193},{"type":414,"tag":454,"props":5513,"children":5514},{"class":456,"line":1061},[5515],{"type":414,"tag":454,"props":5516,"children":5517},{"emptyLinePlaceholder":609},[5518],{"type":419,"value":612},{"type":414,"tag":454,"props":5520,"children":5521},{"class":456,"line":1107},[5522,5526,5531],{"type":414,"tag":454,"props":5523,"children":5524},{"style":467},[5525],{"type":419,"value":812},{"type":414,"tag":454,"props":5527,"children":5528},{"style":815},[5529],{"type":419,"value":5530},"OptionsValidator",{"type":414,"tag":454,"props":5532,"children":5533},{"style":467},[5534],{"type":419,"value":823},{"type":414,"tag":454,"props":5536,"children":5537},{"class":456,"line":1144},[5538,5542,5547,5551,5556,5560,5565,5569,5573],{"type":414,"tag":454,"props":5539,"children":5540},{"style":865},[5541],{"type":419,"value":868},{"type":414,"tag":454,"props":5543,"children":5544},{"style":865},[5545],{"type":419,"value":5546}," partial",{"type":414,"tag":454,"props":5548,"children":5549},{"style":815},[5550],{"type":419,"value":873},{"type":414,"tag":454,"props":5552,"children":5553},{"style":815},[5554],{"type":419,"value":5555}," WeatherMapConfigurationValidator",{"type":414,"tag":454,"props":5557,"children":5558},{"style":467},[5559],{"type":419,"value":883},{"type":414,"tag":454,"props":5561,"children":5562},{"style":815},[5563],{"type":419,"value":5564}," IValidateOptions",{"type":414,"tag":454,"props":5566,"children":5567},{"style":467},[5568],{"type":419,"value":1122},{"type":414,"tag":454,"props":5570,"children":5571},{"style":815},[5572],{"type":419,"value":5260},{"type":414,"tag":454,"props":5574,"children":5575},{"style":467},[5576],{"type":419,"value":5577},">\n",{"type":414,"tag":454,"props":5579,"children":5580},{"class":456,"line":1152},[5581],{"type":414,"tag":454,"props":5582,"children":5583},{"style":467},[5584],{"type":419,"value":896},{"type":414,"tag":454,"props":5586,"children":5587},{"class":456,"line":1179},[5588],{"type":414,"tag":454,"props":5589,"children":5590},{"style":467},[5591],{"type":419,"value":1193},{"type":414,"tag":415,"props":5593,"children":5594},{},[5595,5597,5602,5604,5610],{"type":419,"value":5596},"This way we can make sure that the configuration contains the API Key and the URI that has the ",{"type":414,"tag":450,"props":5598,"children":5600},{"className":5599},[],[5601],{"type":419,"value":5449},{"type":419,"value":5603}," format. The configuration in the ",{"type":414,"tag":450,"props":5605,"children":5607},{"className":5606},[],[5608],{"type":419,"value":5609},"Program.cs",{"type":419,"value":5611}," looks like that:",{"type":414,"tag":444,"props":5613,"children":5615},{"className":799,"code":5614,"language":326,"meta":401,"style":401},"builder.Services.Configure\u003CWeatherMapConfiguration>(builder.Configuration.GetSection(\"WeatherMap\"));\nbuilder.Services.AddSingleton\u003CIValidateOptions\u003CWeatherMapConfiguration>, WeatherMapConfigurationValidator>();\n\nbuilder.Services.AddTransient\u003CApiKeyHandler>();\nbuilder.Services.AddRefitClient\u003CIOpenWeatherMapApi>()\n    .ConfigureHttpClient((provider, client) =>\n    {\n        var configuration = provider.GetRequiredService\u003CIOptions\u003CWeatherMapConfiguration>>().Value;\n        client.BaseAddress = new Uri(configuration.Uri);\n    })\n    .AddHttpMessageHandler\u003CApiKeyHandler>();\n",[5616],{"type":414,"tag":450,"props":5617,"children":5618},{"__ignoreMap":401},[5619,5698,5753,5760,5797,5834,5874,5881,5942,5992,6000],{"type":414,"tag":454,"props":5620,"children":5621},{"class":456,"line":457},[5622,5626,5630,5634,5638,5643,5647,5651,5655,5659,5663,5667,5671,5676,5680,5684,5689,5693],{"type":414,"tag":454,"props":5623,"children":5624},{"style":461},[5625],{"type":419,"value":4652},{"type":414,"tag":454,"props":5627,"children":5628},{"style":467},[5629],{"type":419,"value":705},{"type":414,"tag":454,"props":5631,"children":5632},{"style":461},[5633],{"type":419,"value":4661},{"type":414,"tag":454,"props":5635,"children":5636},{"style":467},[5637],{"type":419,"value":705},{"type":414,"tag":454,"props":5639,"children":5640},{"style":525},[5641],{"type":419,"value":5642},"Configure",{"type":414,"tag":454,"props":5644,"children":5645},{"style":467},[5646],{"type":419,"value":1122},{"type":414,"tag":454,"props":5648,"children":5649},{"style":815},[5650],{"type":419,"value":5260},{"type":414,"tag":454,"props":5652,"children":5653},{"style":467},[5654],{"type":419,"value":4692},{"type":414,"tag":454,"props":5656,"children":5657},{"style":461},[5658],{"type":419,"value":4652},{"type":414,"tag":454,"props":5660,"children":5661},{"style":467},[5662],{"type":419,"value":705},{"type":414,"tag":454,"props":5664,"children":5665},{"style":461},[5666],{"type":419,"value":263},{"type":414,"tag":454,"props":5668,"children":5669},{"style":467},[5670],{"type":419,"value":705},{"type":414,"tag":454,"props":5672,"children":5673},{"style":525},[5674],{"type":419,"value":5675},"GetSection",{"type":414,"tag":454,"props":5677,"children":5678},{"style":467},[5679],{"type":419,"value":840},{"type":414,"tag":454,"props":5681,"children":5682},{"style":467},[5683],{"type":419,"value":845},{"type":414,"tag":454,"props":5685,"children":5686},{"style":599},[5687],{"type":419,"value":5688},"WeatherMap",{"type":414,"tag":454,"props":5690,"children":5691},{"style":467},[5692],{"type":419,"value":845},{"type":414,"tag":454,"props":5694,"children":5695},{"style":467},[5696],{"type":419,"value":5697},"));\n",{"type":414,"tag":454,"props":5699,"children":5700},{"class":456,"line":605},[5701,5705,5709,5713,5717,5722,5726,5731,5735,5739,5744,5748],{"type":414,"tag":454,"props":5702,"children":5703},{"style":461},[5704],{"type":419,"value":4652},{"type":414,"tag":454,"props":5706,"children":5707},{"style":467},[5708],{"type":419,"value":705},{"type":414,"tag":454,"props":5710,"children":5711},{"style":461},[5712],{"type":419,"value":4661},{"type":414,"tag":454,"props":5714,"children":5715},{"style":467},[5716],{"type":419,"value":705},{"type":414,"tag":454,"props":5718,"children":5719},{"style":525},[5720],{"type":419,"value":5721},"AddSingleton",{"type":414,"tag":454,"props":5723,"children":5724},{"style":467},[5725],{"type":419,"value":1122},{"type":414,"tag":454,"props":5727,"children":5728},{"style":815},[5729],{"type":419,"value":5730},"IValidateOptions",{"type":414,"tag":454,"props":5732,"children":5733},{"style":467},[5734],{"type":419,"value":1122},{"type":414,"tag":454,"props":5736,"children":5737},{"style":815},[5738],{"type":419,"value":5260},{"type":414,"tag":454,"props":5740,"children":5741},{"style":467},[5742],{"type":419,"value":5743},">,",{"type":414,"tag":454,"props":5745,"children":5746},{"style":815},[5747],{"type":419,"value":5555},{"type":414,"tag":454,"props":5749,"children":5750},{"style":467},[5751],{"type":419,"value":5752},">();\n",{"type":414,"tag":454,"props":5754,"children":5755},{"class":456,"line":615},[5756],{"type":414,"tag":454,"props":5757,"children":5758},{"emptyLinePlaceholder":609},[5759],{"type":419,"value":612},{"type":414,"tag":454,"props":5761,"children":5762},{"class":456,"line":630},[5763,5767,5771,5775,5779,5784,5788,5793],{"type":414,"tag":454,"props":5764,"children":5765},{"style":461},[5766],{"type":419,"value":4652},{"type":414,"tag":454,"props":5768,"children":5769},{"style":467},[5770],{"type":419,"value":705},{"type":414,"tag":454,"props":5772,"children":5773},{"style":461},[5774],{"type":419,"value":4661},{"type":414,"tag":454,"props":5776,"children":5777},{"style":467},[5778],{"type":419,"value":705},{"type":414,"tag":454,"props":5780,"children":5781},{"style":525},[5782],{"type":419,"value":5783},"AddTransient",{"type":414,"tag":454,"props":5785,"children":5786},{"style":467},[5787],{"type":419,"value":1122},{"type":414,"tag":454,"props":5789,"children":5790},{"style":815},[5791],{"type":419,"value":5792},"ApiKeyHandler",{"type":414,"tag":454,"props":5794,"children":5795},{"style":467},[5796],{"type":419,"value":5752},{"type":414,"tag":454,"props":5798,"children":5799},{"class":456,"line":899},[5800,5804,5808,5812,5816,5821,5825,5829],{"type":414,"tag":454,"props":5801,"children":5802},{"style":461},[5803],{"type":419,"value":4652},{"type":414,"tag":454,"props":5805,"children":5806},{"style":467},[5807],{"type":419,"value":705},{"type":414,"tag":454,"props":5809,"children":5810},{"style":461},[5811],{"type":419,"value":4661},{"type":414,"tag":454,"props":5813,"children":5814},{"style":467},[5815],{"type":419,"value":705},{"type":414,"tag":454,"props":5817,"children":5818},{"style":525},[5819],{"type":419,"value":5820},"AddRefitClient",{"type":414,"tag":454,"props":5822,"children":5823},{"style":467},[5824],{"type":419,"value":1122},{"type":414,"tag":454,"props":5826,"children":5827},{"style":815},[5828],{"type":419,"value":1594},{"type":414,"tag":454,"props":5830,"children":5831},{"style":467},[5832],{"type":419,"value":5833},">()\n",{"type":414,"tag":454,"props":5835,"children":5836},{"class":456,"line":928},[5837,5842,5847,5852,5857,5861,5866,5870],{"type":414,"tag":454,"props":5838,"children":5839},{"style":467},[5840],{"type":419,"value":5841},"    .",{"type":414,"tag":454,"props":5843,"children":5844},{"style":525},[5845],{"type":419,"value":5846},"ConfigureHttpClient",{"type":414,"tag":454,"props":5848,"children":5849},{"style":467},[5850],{"type":419,"value":5851},"((",{"type":414,"tag":454,"props":5853,"children":5854},{"style":815},[5855],{"type":419,"value":5856},"provider",{"type":414,"tag":454,"props":5858,"children":5859},{"style":467},[5860],{"type":419,"value":1516},{"type":414,"tag":454,"props":5862,"children":5863},{"style":815},[5864],{"type":419,"value":5865}," client",{"type":414,"tag":454,"props":5867,"children":5868},{"style":467},[5869],{"type":419,"value":668},{"type":414,"tag":454,"props":5871,"children":5872},{"style":467},[5873],{"type":419,"value":1803},{"type":414,"tag":454,"props":5875,"children":5876},{"class":456,"line":936},[5877],{"type":414,"tag":454,"props":5878,"children":5879},{"style":467},[5880],{"type":419,"value":973},{"type":414,"tag":454,"props":5882,"children":5883},{"class":456,"line":967},[5884,5888,5893,5897,5902,5906,5911,5915,5920,5924,5928,5933,5938],{"type":414,"tag":454,"props":5885,"children":5886},{"style":815},[5887],{"type":419,"value":1696},{"type":414,"tag":454,"props":5889,"children":5890},{"style":815},[5891],{"type":419,"value":5892}," configuration",{"type":414,"tag":454,"props":5894,"children":5895},{"style":467},[5896],{"type":419,"value":1040},{"type":414,"tag":454,"props":5898,"children":5899},{"style":461},[5900],{"type":419,"value":5901}," provider",{"type":414,"tag":454,"props":5903,"children":5904},{"style":467},[5905],{"type":419,"value":705},{"type":414,"tag":454,"props":5907,"children":5908},{"style":525},[5909],{"type":419,"value":5910},"GetRequiredService",{"type":414,"tag":454,"props":5912,"children":5913},{"style":467},[5914],{"type":419,"value":1122},{"type":414,"tag":454,"props":5916,"children":5917},{"style":815},[5918],{"type":419,"value":5919},"IOptions",{"type":414,"tag":454,"props":5921,"children":5922},{"style":467},[5923],{"type":419,"value":1122},{"type":414,"tag":454,"props":5925,"children":5926},{"style":815},[5927],{"type":419,"value":5260},{"type":414,"tag":454,"props":5929,"children":5930},{"style":467},[5931],{"type":419,"value":5932},">>().",{"type":414,"tag":454,"props":5934,"children":5935},{"style":461},[5936],{"type":419,"value":5937},"Value",{"type":414,"tag":454,"props":5939,"children":5940},{"style":467},[5941],{"type":419,"value":925},{"type":414,"tag":454,"props":5943,"children":5944},{"class":456,"line":976},[5945,5950,5954,5959,5963,5967,5971,5975,5979,5983,5988],{"type":414,"tag":454,"props":5946,"children":5947},{"style":461},[5948],{"type":419,"value":5949},"        client",{"type":414,"tag":454,"props":5951,"children":5952},{"style":467},[5953],{"type":419,"value":705},{"type":414,"tag":454,"props":5955,"children":5956},{"style":461},[5957],{"type":419,"value":5958},"BaseAddress ",{"type":414,"tag":454,"props":5960,"children":5961},{"style":467},[5962],{"type":419,"value":987},{"type":414,"tag":454,"props":5964,"children":5965},{"style":467},[5966],{"type":419,"value":3351},{"type":414,"tag":454,"props":5968,"children":5969},{"style":815},[5970],{"type":419,"value":5473},{"type":414,"tag":454,"props":5972,"children":5973},{"style":467},[5974],{"type":419,"value":840},{"type":414,"tag":454,"props":5976,"children":5977},{"style":461},[5978],{"type":419,"value":262},{"type":414,"tag":454,"props":5980,"children":5981},{"style":467},[5982],{"type":419,"value":705},{"type":414,"tag":454,"props":5984,"children":5985},{"style":461},[5986],{"type":419,"value":5987},"Uri",{"type":414,"tag":454,"props":5989,"children":5990},{"style":467},[5991],{"type":419,"value":1567},{"type":414,"tag":454,"props":5993,"children":5994},{"class":456,"line":998},[5995],{"type":414,"tag":454,"props":5996,"children":5997},{"style":467},[5998],{"type":419,"value":5999},"    })\n",{"type":414,"tag":454,"props":6001,"children":6002},{"class":456,"line":1007},[6003,6007,6012,6016,6020],{"type":414,"tag":454,"props":6004,"children":6005},{"style":467},[6006],{"type":419,"value":5841},{"type":414,"tag":454,"props":6008,"children":6009},{"style":525},[6010],{"type":419,"value":6011},"AddHttpMessageHandler",{"type":414,"tag":454,"props":6013,"children":6014},{"style":467},[6015],{"type":419,"value":1122},{"type":414,"tag":454,"props":6017,"children":6018},{"style":815},[6019],{"type":419,"value":5792},{"type":414,"tag":454,"props":6021,"children":6022},{"style":467},[6023],{"type":419,"value":5752},{"type":414,"tag":421,"props":6025,"children":6027},{"id":6026},"a-few-closing-words",[6028],{"type":419,"value":6029},"A few closing words",{"type":414,"tag":415,"props":6031,"children":6032},{},[6033],{"type":419,"value":6034},"Here is the recap of what we talked about:",{"type":419,"value":6036},"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",{"type":414,"tag":6038,"props":6039,"children":6040},"table",{},[6041,6060],{"type":414,"tag":6042,"props":6043,"children":6044},"thead",{},[6045],{"type":414,"tag":6046,"props":6047,"children":6048},"tr",{},[6049,6055],{"type":414,"tag":6050,"props":6051,"children":6052},"th",{},[6053],{"type":419,"value":6054},"Feature",{"type":414,"tag":6050,"props":6056,"children":6057},{},[6058],{"type":419,"value":6059},"Area",{"type":414,"tag":6061,"props":6062,"children":6063},"tbody",{},[6064,6082,6100,6116,6132,6149,6167,6183],{"type":414,"tag":6046,"props":6065,"children":6066},{},[6067,6077],{"type":414,"tag":6068,"props":6069,"children":6070},"td",{},[6071],{"type":414,"tag":433,"props":6072,"children":6074},{"href":1209,"rel":6073},[437],[6075],{"type":419,"value":6076},"Support for generic attributes",{"type":414,"tag":6068,"props":6078,"children":6079},{},[6080],{"type":419,"value":6081},".NET 8",{"type":414,"tag":6046,"props":6083,"children":6084},{},[6085,6095],{"type":414,"tag":6068,"props":6086,"children":6087},{},[6088],{"type":414,"tag":433,"props":6089,"children":6092},{"href":6090,"rel":6091},"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12#primary-constructors",[437],[6093],{"type":419,"value":6094},"Primary constructors",{"type":414,"tag":6068,"props":6096,"children":6097},{},[6098],{"type":419,"value":6099},"C# 12",{"type":414,"tag":6046,"props":6101,"children":6102},{},[6103,6112],{"type":414,"tag":6068,"props":6104,"children":6105},{},[6106],{"type":414,"tag":433,"props":6107,"children":6109},{"href":3530,"rel":6108},[437],[6110],{"type":419,"value":6111},"Collection expressions",{"type":414,"tag":6068,"props":6113,"children":6114},{},[6115],{"type":419,"value":6099},{"type":414,"tag":6046,"props":6117,"children":6118},{},[6119,6128],{"type":414,"tag":6068,"props":6120,"children":6121},{},[6122],{"type":414,"tag":433,"props":6123,"children":6125},{"href":2768,"rel":6124},[437],[6126],{"type":419,"value":6127},"Optional parameters in lambda expressions",{"type":414,"tag":6068,"props":6129,"children":6130},{},[6131],{"type":419,"value":6099},{"type":414,"tag":6046,"props":6133,"children":6134},{},[6135,6145],{"type":414,"tag":6068,"props":6136,"children":6137},{},[6138],{"type":414,"tag":433,"props":6139,"children":6142},{"href":6140,"rel":6141},"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12#alias-any-type",[437],[6143],{"type":419,"value":6144},"Alias any type",{"type":414,"tag":6068,"props":6146,"children":6147},{},[6148],{"type":419,"value":6099},{"type":414,"tag":6046,"props":6150,"children":6151},{},[6152,6162],{"type":414,"tag":6068,"props":6153,"children":6154},{},[6155],{"type":414,"tag":433,"props":6156,"children":6159},{"href":6157,"rel":6158},"https://learn.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute",[437],[6160],{"type":419,"value":6161},"Debug customization attributes on ASP.NET Core types      ",{"type":414,"tag":6068,"props":6163,"children":6164},{},[6165],{"type":419,"value":6166},"ASP.NET Core 8",{"type":414,"tag":6046,"props":6168,"children":6169},{},[6170,6179],{"type":414,"tag":6068,"props":6171,"children":6172},{},[6173],{"type":414,"tag":433,"props":6174,"children":6176},{"href":5278,"rel":6175},[437],[6177],{"type":419,"value":6178},"Options validation",{"type":414,"tag":6068,"props":6180,"children":6181},{},[6182],{"type":419,"value":6081},{"type":414,"tag":6046,"props":6184,"children":6185},{},[6186,6195],{"type":414,"tag":6068,"props":6187,"children":6188},{},[6189],{"type":414,"tag":433,"props":6190,"children":6192},{"href":4627,"rel":6191},[437],[6193],{"type":419,"value":6194},"Keyed DI Services",{"type":414,"tag":6068,"props":6196,"children":6197},{},[6198],{"type":419,"value":6081},{"type":414,"tag":415,"props":6200,"children":6201},{},[6202,6204,6210,6212,6217,6219,6225],{"type":419,"value":6203},"There are many more interesting features in ",{"type":414,"tag":433,"props":6205,"children":6208},{"href":6206,"rel":6207},"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12",[437],[6209],{"type":419,"value":6099},{"type":419,"value":6211},", ",{"type":414,"tag":433,"props":6213,"children":6215},{"href":4627,"rel":6214},[437],[6216],{"type":419,"value":6081},{"type":419,"value":6218},", or ",{"type":414,"tag":433,"props":6220,"children":6223},{"href":6221,"rel":6222},"https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-8.0?view=aspnetcore-8.0",[437],[6224],{"type":419,"value":6166},{"type":419,"value":6226},". Yet, the ones I introduced in this article are the ones I will probably use the most.",{"type":414,"tag":415,"props":6228,"children":6229},{},[6230,6232,6239,6241,6247],{"type":419,"value":6231},"You can find the complete code sample ",{"type":414,"tag":433,"props":6233,"children":6236},{"href":6234,"rel":6235},"https://github.com/TechWatching/CodeAppAndInfraInDotnet8",[437],[6237],{"type":419,"value":6238},"here",{"type":419,"value":6240},". The repository also contains a folder ",{"type":414,"tag":450,"props":6242,"children":6244},{"className":6243},[],[6245],{"type":419,"value":6246},"infra",{"type":419,"value":6248}," to set up the Azure infrastructure to host this API. 2 IaC solutions that use .NET are shown: one using Azure SDK and one using Pulumi.",{"type":414,"tag":415,"props":6250,"children":6251},{},[6252,6254,6261],{"type":419,"value":6253},"This article was published as part of the ",{"type":414,"tag":433,"props":6255,"children":6258},{"href":6256,"rel":6257},"https://www.csadvent.christmas/",[437],[6259],{"type":419,"value":6260},"C# Advent 2023",{"type":419,"value":6262}," which is a nice initiative. Make sure to check the other blog articles on the advent calendar.",{"type":414,"tag":6264,"props":6265,"children":6266},"style",{},[6267],{"type":419,"value":6268},"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":401,"searchDepth":605,"depth":605,"links":6270},[6271,6272,6273],{"id":423,"depth":605,"text":426},{"id":717,"depth":605,"text":720},{"id":6026,"depth":605,"text":6029},"markdown","content:1.posts:56.playing-with-dotnet8.md","content","1.posts/56.playing-with-dotnet8.md","md",1716749600859]