Skip to content

Commit 573b42d

Browse files
committed
Setup demo in WASM project
1 parent 154bf2b commit 573b42d

21 files changed

+23
-1039
lines changed

samples/SharedDemo/Demos/DynamicInsertions.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ protected override void OnInitialized()
1515
{
1616
base.OnInitialized();
1717

18-
var node1 = new NodeModel(new Point(50, 50));
18+
var node1 = new NodeModel(new Point(300, 50));
1919
var node2 = new NodeModel(new Point(300, 400));
2020
diagramManager.AddNodes(node1, node2);
2121
}

samples/Wasm/App.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(TestComponents.Simple).Assembly }">
1+
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(SharedDemo.Home).Assembly }">
22
<Found Context="routeData">
3-
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(SharedDemo.Layouts.DocsLayout)" />
44
</Found>
55
<NotFound>
6-
<LayoutView Layout="@typeof(MainLayout)">
6+
<LayoutView Layout="@typeof(SharedDemo.Layouts.EmptyLayout)">
77
<p>Sorry, there's nothing at this address.</p>
88
</LayoutView>
99
</NotFound>

samples/Wasm/Pages/Index.razor

Lines changed: 0 additions & 7 deletions
This file was deleted.

samples/Wasm/Program.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
2+
using Microsoft.Extensions.DependencyInjection;
3+
using SharedDemo;
14
using System;
25
using System.Net.Http;
3-
using System.Collections.Generic;
46
using System.Threading.Tasks;
5-
using System.Text;
6-
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
7-
using Microsoft.Extensions.Configuration;
8-
using Microsoft.Extensions.DependencyInjection;
9-
using Microsoft.Extensions.Logging;
107

118
namespace Wasm
129
{
@@ -17,6 +14,7 @@ public static async Task Main(string[] args)
1714
var builder = WebAssemblyHostBuilder.CreateDefault(args);
1815
builder.RootComponents.Add<App>("app");
1916

17+
builder.Services.AddSingleton<LayoutData>();
2018
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
2119

2220
await builder.Build().RunAsync();

samples/Wasm/Shared/MainLayout.razor

Lines changed: 0 additions & 15 deletions
This file was deleted.

samples/Wasm/Shared/SurveyPrompt.razor

Lines changed: 0 additions & 16 deletions
This file was deleted.

samples/Wasm/_Imports.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@
66
@using Microsoft.AspNetCore.Components.WebAssembly.Http
77
@using Microsoft.JSInterop
88
@using Wasm
9-
@using Wasm.Shared

samples/Wasm/wwwroot/css/app.css

Lines changed: 0 additions & 185 deletions
This file was deleted.

samples/Wasm/wwwroot/css/bootstrap/bootstrap.min.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

samples/Wasm/wwwroot/css/bootstrap/bootstrap.min.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)