| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- #pragma checksum "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5d21b87bc8a2e8f0317d1e6f682a62bad19fe749"
- // <auto-generated/>
- #pragma warning disable 1591
- namespace CaritasPWA.Pages
- {
- #line hidden
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Components;
- #nullable restore
- #line 1 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using System.Net.Http;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 2 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using System.Net.Http.Json;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 3 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using Microsoft.AspNetCore.Components.Forms;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 4 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using Microsoft.AspNetCore.Components.Routing;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 5 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using Microsoft.AspNetCore.Components.Web;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 6 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using Microsoft.AspNetCore.Components.WebAssembly.Http;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 7 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using Microsoft.JSInterop;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 8 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using CaritasPWA;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 9 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using CaritasPWA.Shared;
-
- #line default
- #line hidden
- #nullable disable
- #nullable restore
- #line 10 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
- using MatBlazor;
-
- #line default
- #line hidden
- #nullable disable
- [Microsoft.AspNetCore.Components.RouteAttribute("/fetchdata")]
- public partial class FetchData : Microsoft.AspNetCore.Components.ComponentBase
- {
- #pragma warning disable 1998
- protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
- {
- __builder.AddMarkupContent(0, "<h1>Weather forecast</h1>\r\n\r\n");
- __builder.AddMarkupContent(1, "<p>This component demonstrates fetching data from the server.</p>\r\n\r\n");
- #nullable restore
- #line 8 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- if (forecasts == null)
- {
-
- #line default
- #line hidden
- #nullable disable
- __builder.AddContent(2, " ");
- __builder.AddMarkupContent(3, "<p><em>Loading...</em></p>\r\n");
- #nullable restore
- #line 11 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- }
- else
- {
-
- #line default
- #line hidden
- #nullable disable
- __builder.AddContent(4, " ");
- __builder.OpenElement(5, "table");
- __builder.AddAttribute(6, "class", "table");
- __builder.AddMarkupContent(7, "\r\n ");
- __builder.AddMarkupContent(8, "<thead>\r\n <tr>\r\n <th>Date</th>\r\n <th>Temp. (C)</th>\r\n <th>Temp. (F)</th>\r\n <th>Summary</th>\r\n </tr>\r\n </thead>\r\n ");
- __builder.OpenElement(9, "tbody");
- __builder.AddMarkupContent(10, "\r\n");
- #nullable restore
- #line 24 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- foreach (var forecast in forecasts)
- {
-
- #line default
- #line hidden
- #nullable disable
- __builder.AddContent(11, " ");
- __builder.OpenElement(12, "tr");
- __builder.AddMarkupContent(13, "\r\n ");
- __builder.OpenElement(14, "td");
- __builder.AddContent(15,
- #nullable restore
- #line 27 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- forecast.Date.ToShortDateString()
-
- #line default
- #line hidden
- #nullable disable
- );
- __builder.CloseElement();
- __builder.AddMarkupContent(16, "\r\n ");
- __builder.OpenElement(17, "td");
- __builder.AddContent(18,
- #nullable restore
- #line 28 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- forecast.TemperatureC
-
- #line default
- #line hidden
- #nullable disable
- );
- __builder.CloseElement();
- __builder.AddMarkupContent(19, "\r\n ");
- __builder.OpenElement(20, "td");
- __builder.AddContent(21,
- #nullable restore
- #line 29 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- forecast.TemperatureF
-
- #line default
- #line hidden
- #nullable disable
- );
- __builder.CloseElement();
- __builder.AddMarkupContent(22, "\r\n ");
- __builder.OpenElement(23, "td");
- __builder.AddContent(24,
- #nullable restore
- #line 30 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- forecast.Summary
-
- #line default
- #line hidden
- #nullable disable
- );
- __builder.CloseElement();
- __builder.AddMarkupContent(25, "\r\n ");
- __builder.CloseElement();
- __builder.AddMarkupContent(26, "\r\n");
- #nullable restore
- #line 32 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- }
-
- #line default
- #line hidden
- #nullable disable
- __builder.AddContent(27, " ");
- __builder.CloseElement();
- __builder.AddMarkupContent(28, "\r\n ");
- __builder.CloseElement();
- __builder.AddMarkupContent(29, "\r\n");
- #nullable restore
- #line 35 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
- }
-
- #line default
- #line hidden
- #nullable disable
- }
- #pragma warning restore 1998
- #nullable restore
- #line 37 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
-
- private WeatherForecast[] forecasts;
-
- protected override async Task OnInitializedAsync()
- {
- forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
- }
-
- public class WeatherForecast
- {
- public DateTime Date { get; set; }
-
- public int TemperatureC { get; set; }
-
- public string Summary { get; set; }
-
- public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
- }
-
- #line default
- #line hidden
- #nullable disable
- [global::Microsoft.AspNetCore.Components.InjectAttribute] private HttpClient Http { get; set; }
- }
- }
- #pragma warning restore 1591
|