PWA Fundvelo der Caritas.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

FetchData.razor.g.cs 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. #pragma checksum "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "5d21b87bc8a2e8f0317d1e6f682a62bad19fe749"
  2. // <auto-generated/>
  3. #pragma warning disable 1591
  4. namespace CaritasPWA.Pages
  5. {
  6. #line hidden
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Threading.Tasks;
  11. using Microsoft.AspNetCore.Components;
  12. #nullable restore
  13. #line 1 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  14. using System.Net.Http;
  15. #line default
  16. #line hidden
  17. #nullable disable
  18. #nullable restore
  19. #line 2 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  20. using System.Net.Http.Json;
  21. #line default
  22. #line hidden
  23. #nullable disable
  24. #nullable restore
  25. #line 3 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  26. using Microsoft.AspNetCore.Components.Forms;
  27. #line default
  28. #line hidden
  29. #nullable disable
  30. #nullable restore
  31. #line 4 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  32. using Microsoft.AspNetCore.Components.Routing;
  33. #line default
  34. #line hidden
  35. #nullable disable
  36. #nullable restore
  37. #line 5 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  38. using Microsoft.AspNetCore.Components.Web;
  39. #line default
  40. #line hidden
  41. #nullable disable
  42. #nullable restore
  43. #line 6 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  44. using Microsoft.AspNetCore.Components.WebAssembly.Http;
  45. #line default
  46. #line hidden
  47. #nullable disable
  48. #nullable restore
  49. #line 7 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  50. using Microsoft.JSInterop;
  51. #line default
  52. #line hidden
  53. #nullable disable
  54. #nullable restore
  55. #line 8 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  56. using CaritasPWA;
  57. #line default
  58. #line hidden
  59. #nullable disable
  60. #nullable restore
  61. #line 9 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  62. using CaritasPWA.Shared;
  63. #line default
  64. #line hidden
  65. #nullable disable
  66. #nullable restore
  67. #line 10 "D:\Work\Caritas\CaritasPWA\_Imports.razor"
  68. using MatBlazor;
  69. #line default
  70. #line hidden
  71. #nullable disable
  72. [Microsoft.AspNetCore.Components.RouteAttribute("/fetchdata")]
  73. public partial class FetchData : Microsoft.AspNetCore.Components.ComponentBase
  74. {
  75. #pragma warning disable 1998
  76. protected override void BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
  77. {
  78. __builder.AddMarkupContent(0, "<h1>Weather forecast</h1>\r\n\r\n");
  79. __builder.AddMarkupContent(1, "<p>This component demonstrates fetching data from the server.</p>\r\n\r\n");
  80. #nullable restore
  81. #line 8 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  82. if (forecasts == null)
  83. {
  84. #line default
  85. #line hidden
  86. #nullable disable
  87. __builder.AddContent(2, " ");
  88. __builder.AddMarkupContent(3, "<p><em>Loading...</em></p>\r\n");
  89. #nullable restore
  90. #line 11 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  91. }
  92. else
  93. {
  94. #line default
  95. #line hidden
  96. #nullable disable
  97. __builder.AddContent(4, " ");
  98. __builder.OpenElement(5, "table");
  99. __builder.AddAttribute(6, "class", "table");
  100. __builder.AddMarkupContent(7, "\r\n ");
  101. __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 ");
  102. __builder.OpenElement(9, "tbody");
  103. __builder.AddMarkupContent(10, "\r\n");
  104. #nullable restore
  105. #line 24 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  106. foreach (var forecast in forecasts)
  107. {
  108. #line default
  109. #line hidden
  110. #nullable disable
  111. __builder.AddContent(11, " ");
  112. __builder.OpenElement(12, "tr");
  113. __builder.AddMarkupContent(13, "\r\n ");
  114. __builder.OpenElement(14, "td");
  115. __builder.AddContent(15,
  116. #nullable restore
  117. #line 27 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  118. forecast.Date.ToShortDateString()
  119. #line default
  120. #line hidden
  121. #nullable disable
  122. );
  123. __builder.CloseElement();
  124. __builder.AddMarkupContent(16, "\r\n ");
  125. __builder.OpenElement(17, "td");
  126. __builder.AddContent(18,
  127. #nullable restore
  128. #line 28 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  129. forecast.TemperatureC
  130. #line default
  131. #line hidden
  132. #nullable disable
  133. );
  134. __builder.CloseElement();
  135. __builder.AddMarkupContent(19, "\r\n ");
  136. __builder.OpenElement(20, "td");
  137. __builder.AddContent(21,
  138. #nullable restore
  139. #line 29 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  140. forecast.TemperatureF
  141. #line default
  142. #line hidden
  143. #nullable disable
  144. );
  145. __builder.CloseElement();
  146. __builder.AddMarkupContent(22, "\r\n ");
  147. __builder.OpenElement(23, "td");
  148. __builder.AddContent(24,
  149. #nullable restore
  150. #line 30 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  151. forecast.Summary
  152. #line default
  153. #line hidden
  154. #nullable disable
  155. );
  156. __builder.CloseElement();
  157. __builder.AddMarkupContent(25, "\r\n ");
  158. __builder.CloseElement();
  159. __builder.AddMarkupContent(26, "\r\n");
  160. #nullable restore
  161. #line 32 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  162. }
  163. #line default
  164. #line hidden
  165. #nullable disable
  166. __builder.AddContent(27, " ");
  167. __builder.CloseElement();
  168. __builder.AddMarkupContent(28, "\r\n ");
  169. __builder.CloseElement();
  170. __builder.AddMarkupContent(29, "\r\n");
  171. #nullable restore
  172. #line 35 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  173. }
  174. #line default
  175. #line hidden
  176. #nullable disable
  177. }
  178. #pragma warning restore 1998
  179. #nullable restore
  180. #line 37 "D:\Work\Caritas\CaritasPWA\Pages\FetchData.razor"
  181. private WeatherForecast[] forecasts;
  182. protected override async Task OnInitializedAsync()
  183. {
  184. forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
  185. }
  186. public class WeatherForecast
  187. {
  188. public DateTime Date { get; set; }
  189. public int TemperatureC { get; set; }
  190. public string Summary { get; set; }
  191. public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
  192. }
  193. #line default
  194. #line hidden
  195. #nullable disable
  196. [global::Microsoft.AspNetCore.Components.InjectAttribute] private HttpClient Http { get; set; }
  197. }
  198. }
  199. #pragma warning restore 1591