Created
November 3, 2019 09:05
-
-
Save peterblazejewicz/9c3e0a7d3bb615c82f308bf2e6882cc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma checksum "Counter.razor" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "d4fabfd6e6d002e957b53fad126e1419708789b9" | |
// <auto-generated/> | |
#pragma warning disable 1591 | |
namespace WebApplication1.Pages | |
{ | |
#line hidden | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Components; | |
using System.Net.Http; | |
using Microsoft.AspNetCore.Components.Forms; | |
using Microsoft.AspNetCore.Components.Layouts; | |
using Microsoft.AspNetCore.Components.Routing; | |
using Microsoft.JSInterop; | |
using WebApplication5; | |
using WebApplication5.Shared; | |
[Microsoft.AspNetCore.Components.Layouts.LayoutAttribute(typeof(MainLayout))] | |
[Microsoft.AspNetCore.Components.RouteAttribute("/counter")] | |
public class Counter : Microsoft.AspNetCore.Components.ComponentBase | |
{ | |
#pragma warning disable 1998 | |
protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) | |
{ | |
builder.AddMarkupContent(0, "<h1>Counter</h1>\r\n\r\n"); | |
builder.OpenElement(1, "p"); | |
builder.AddContent(2, "Current count: "); | |
builder.AddContent(3, currentCount); | |
builder.CloseElement(); | |
builder.AddMarkupContent(4, "\r\n\r\n"); | |
builder.OpenElement(5, "button"); | |
builder.AddAttribute(6, "class", "btn btn-primary"); | |
builder.AddAttribute(7, "onclick", Microsoft.AspNetCore.Components.EventCallback.Factory.Create<Microsoft.AspNetCore.Components.UIMouseEventArgs>(this, IncrementCount)); | |
builder.AddContent(8, "Click me"); | |
builder.CloseElement(); | |
} | |
#pragma warning restore 1998 | |
#line 9 "Counter.razor" | |
int currentCount = 0; | |
void IncrementCount() | |
{ | |
currentCount++; | |
} | |
#line default | |
#line hidden | |
} | |
} | |
#pragma warning restore 1591 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment