Fixup
This commit is contained in:
parent
ba094b6ccb
commit
f0c6fca60f
|
|
@ -0,0 +1,9 @@
|
|||
namespace BlazingPizza.Server
|
||||
{
|
||||
public class Point
|
||||
{
|
||||
public double X { get; set; }
|
||||
|
||||
public double Y { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
@page "/orderstatus"
|
||||
@using System.Threading
|
||||
@using Microsoft.JSInterop
|
||||
@inject IJSRuntime JSRuntime
|
||||
@implements IDisposable
|
||||
|
||||
|
||||
<div id="status" data-loc="@locString">Your order is on it's way. Here is it's current location: (@locX, @locY)</div>
|
||||
|
||||
@functions {
|
||||
private int locX;
|
||||
private int locY;
|
||||
private Random random = new Random();
|
||||
private Timer timer;
|
||||
private string locString;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
timer = new Timer(_ =>
|
||||
{
|
||||
locX = random.Next(1000);
|
||||
locY = random.Next(1000);
|
||||
locString = $"{locX},{locY}";
|
||||
|
||||
InvokeAsync(() => StateHasChanged());
|
||||
}, default, TimeSpan.Zero, TimeSpan.FromSeconds(2));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
timer.Dispose();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
## Blazor benchamrks
|
||||
## Blazor benchmarks
|
||||
|
||||
These projects assist in Benchmarking Components.
|
||||
See https://github.com/aspnet/Benchmarks#benchmarks for usage guidance on using the Benchmarking tool with your application
|
||||
|
|
|
|||
Loading…
Reference in New Issue