|
#pragma checksum "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor" "{8829d00f-11b8-4213-878b-770e8597ac16}" "55669bc684380a592f180eeb71d37bb243d7910a1162748a5569622d1774881d"
// <auto-generated/>
#pragma warning disable 1591
namespace Wasm.Performance.TestApp.Pages
{
#line default
using global::System;
using global::System.Collections.Generic;
using global::System.Linq;
using global::System.Threading.Tasks;
using global::Microsoft.AspNetCore.Components;
#nullable restore
#line (1,2)-(1,23) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using System.Net.Http
#nullable disable
;
#nullable restore
#line (2,2)-(2,47) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using Microsoft.AspNetCore.Components.Routing
#nullable disable
;
#nullable restore
#line (3,2)-(3,45) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using Microsoft.AspNetCore.Components.Forms
#nullable disable
;
#nullable restore
#line (4,2)-(4,43) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using Microsoft.AspNetCore.Components.Web
#nullable disable
;
#nullable restore
#line (5,2)-(5,27) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using Microsoft.JSInterop
#nullable disable
;
#nullable restore
#line (6,2)-(6,32) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using Wasm.Performance.TestApp
#nullable disable
;
#nullable restore
#line (7,2)-(7,39) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\_Imports.razor"
using Wasm.Performance.TestApp.Shared
#nullable disable
;
#line default
#line hidden
[global::Microsoft.AspNetCore.Components.LayoutAttribute(typeof(
#nullable restore
#line (1,9)-(1,19) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\_Imports.razor"
MainLayout
#line default
#line hidden
#nullable disable
))]
[global::Microsoft.AspNetCore.Components.RouteAttribute(
// language=Route,Component
#nullable restore
#line (1,7)-(1,20) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
"/renderlist"
#line default
#line hidden
#nullable disable
)]
#nullable restore
public partial class RenderList : global::Microsoft.AspNetCore.Components.ComponentBase
#nullable disable
{
#pragma warning disable 1998
protected override void BuildRenderTree(global::Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder)
{
__builder.AddMarkupContent(0, "<h2>Render List</h2>\r\n\r\nNumber of items: ");
__builder.OpenElement(1, "input");
__builder.AddAttribute(2, "id", "num-items");
__builder.AddAttribute(3, "type", "number");
__builder.AddAttribute(4, "value", global::Microsoft.AspNetCore.Components.BindConverter.FormatValue(
#nullable restore
#line (6,60)-(6,68) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
numItems
#line default
#line hidden
#nullable disable
, culture: global::System.Globalization.CultureInfo.InvariantCulture));
__builder.AddAttribute(5, "onchange", global::Microsoft.AspNetCore.Components.EventCallback.Factory.CreateBinder(this, __value => numItems = __value, numItems, culture: global::System.Globalization.CultureInfo.InvariantCulture));
__builder.SetUpdatesAttributeName("value");
__builder.CloseElement();
__builder.AddMarkupContent(6, "\r\n");
__builder.OpenElement(7, "button");
__builder.AddAttribute(8, "id", "show-list");
__builder.AddAttribute(9, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
#nullable restore
#line (7,33)-(7,37) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
Show
#line default
#line hidden
#nullable disable
));
__builder.AddContent(10, "Show");
__builder.CloseElement();
__builder.AddMarkupContent(11, "\r\n");
__builder.OpenElement(12, "button");
__builder.AddAttribute(13, "id", "hide-list");
__builder.AddAttribute(14, "onclick", global::Microsoft.AspNetCore.Components.EventCallback.Factory.Create<global::Microsoft.AspNetCore.Components.Web.MouseEventArgs>(this,
#nullable restore
#line (8,33)-(8,37) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
Hide
#line default
#line hidden
#nullable disable
));
__builder.AddContent(15, "Hide");
__builder.CloseElement();
#nullable restore
#line (10,2)-(12,1) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
if (show)
{
#line default
#line hidden
#nullable disable
__builder.OpenElement(16, "table");
__builder.AddAttribute(17, "class", "table");
__builder.AddMarkupContent(18, "<thead><tr><th>Date</th>\r\n <th>Temp. (C)</th>\r\n <th>Temp. (F)</th>\r\n <th>Summary</th></tr></thead>\r\n ");
__builder.OpenElement(19, "tbody");
#nullable restore
#line (22,1)-(22,13) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
#line default
#line hidden
#nullable disable
#nullable restore
#line (22,14)-(24,1) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
foreach (var forecast in GenerateForecasts(numItems))
{
#line default
#line hidden
#nullable disable
__builder.OpenElement(20, "tr");
__builder.OpenElement(21, "td");
#nullable restore
#line (25,26)-(25,48) 25 "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
__builder.AddContent(22, forecast.DateFormatted
#line default
#line hidden
#nullable disable
);
__builder.CloseElement();
__builder.AddMarkupContent(23, "\r\n ");
__builder.OpenElement(24, "td");
#nullable restore
#line (26,26)-(26,47) 25 "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
__builder.AddContent(25, forecast.TemperatureC
#line default
#line hidden
#nullable disable
);
__builder.CloseElement();
__builder.AddMarkupContent(26, "\r\n ");
__builder.OpenElement(27, "td");
#nullable restore
#line (27,26)-(27,47) 25 "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
__builder.AddContent(28, forecast.TemperatureF
#line default
#line hidden
#nullable disable
);
__builder.CloseElement();
__builder.AddMarkupContent(29, "\r\n ");
__builder.OpenElement(30, "td");
#nullable restore
#line (28,26)-(28,42) 25 "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
__builder.AddContent(31, forecast.Summary
#line default
#line hidden
#nullable disable
);
__builder.CloseElement();
__builder.CloseElement();
#nullable restore
#line (30,1)-(31,1) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
}
#line default
#line hidden
#nullable disable
__builder.CloseElement();
__builder.CloseElement();
#nullable restore
#line (33,1)-(34,1) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
}
#line default
#line hidden
#nullable disable
}
#pragma warning restore 1998
#nullable restore
#line (35,8)-(75,1) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
int numItems = 10;
bool show = false;
void Hide()
{
show = false;
}
void Show()
{
show = true;
}
protected override void OnAfterRender(bool firstRender)
{
BenchmarkEvent.Send(JSRuntime, "Finished rendering list");
}
static IEnumerable<WeatherForecast> GenerateForecasts(int count)
{
for (var i = 0; i < count; i++)
{
yield return new WeatherForecast
{
DateFormatted = DateTime.Now.AddDays(i).ToShortDateString(),
TemperatureC = i % 100,
TemperatureF = (int)((i % 100) * 1.8) + 32,
Summary = $"Item {i}",
};
}
}
class WeatherForecast
{
public string DateFormatted { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF { get; set; }
public string Summary { get; set; }
}
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Components.InjectAttribute] private
#nullable restore
#line (2,9)-(2,19) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
IJSRuntime
#line default
#line hidden
#nullable disable
#nullable restore
#line (2,20)-(2,29) "D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\Pages\RenderList.razor"
JSRuntime
#line default
#line hidden
#nullable disable
{ get; set; }
= default!;
}
}
#pragma warning restore 1591
|