From 3aa911d48c8a9979a4a2f9e2e74bb92b53b0ce6e Mon Sep 17 00:00:00 2001 From: dani herrera Date: Fri, 16 Aug 2019 17:19:22 +0200 Subject: [PATCH] Migrated to p8 --- src/blagario.Unit.Tests/SplitTests.cs | 2 +- src/blagario/Pages/Index.cs | 4 ++-- src/blagario/Pages/Index.razor | 2 +- src/blagario/_Imports.razor | 1 - src/global.json | 5 +++++ 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 src/global.json diff --git a/src/blagario.Unit.Tests/SplitTests.cs b/src/blagario.Unit.Tests/SplitTests.cs index 80df6e7..d50aca9 100644 --- a/src/blagario.Unit.Tests/SplitTests.cs +++ b/src/blagario.Unit.Tests/SplitTests.cs @@ -42,7 +42,7 @@ public async Task CheckSplit() // Distance should increase Assert.Equal(8, cell.Count ); - Assert.All( cell, c=> Assert.True(c.X > 400 && c.X < 500) ); + Assert.All( cell, c=> Assert.True(c.X > 300 && c.X < 505) ); } } diff --git a/src/blagario/Pages/Index.cs b/src/blagario/Pages/Index.cs index 448d0ee..27a54a6 100644 --- a/src/blagario/Pages/Index.cs +++ b/src/blagario/Pages/Index.cs @@ -22,13 +22,13 @@ public void Dispose() { protected List VisibleElements = new List(); - protected override void OnInit() + protected override void OnInitialized() { Universe.World.OnTicReached += UpdateUi; } private void UpdateUi(object sender, EventArgs ea) { - Invoke( + InvokeAsync( () => { VisibleElements = Universe diff --git a/src/blagario/Pages/Index.razor b/src/blagario/Pages/Index.razor index 0c26c9c..1806053 100644 --- a/src/blagario/Pages/Index.razor +++ b/src/blagario/Pages/Index.razor @@ -49,7 +49,7 @@ {
- +
} diff --git a/src/blagario/_Imports.razor b/src/blagario/_Imports.razor index 0bd5c20..27aa05b 100644 --- a/src/blagario/_Imports.razor +++ b/src/blagario/_Imports.razor @@ -1,6 +1,5 @@ @using System.Net.Http @using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Layouts @using Microsoft.AspNetCore.Components.Routing @using Microsoft.JSInterop @using blagario diff --git a/src/global.json b/src/global.json new file mode 100644 index 0000000..b2be104 --- /dev/null +++ b/src/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "3.0.100-preview8-013656" + } +} \ No newline at end of file