From b834f3b35bc583b1c620bef175342094571d5e6a Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 13 Feb 2018 19:58:39 +0000 Subject: [PATCH] Use Razor component in HostedInAspNet.Client --- samples/HostedInAspNet.Client/Home.cshtml | 1 + samples/HostedInAspNet.Client/Program.cs | 18 +----------------- 2 files changed, 2 insertions(+), 17 deletions(-) create mode 100644 samples/HostedInAspNet.Client/Home.cshtml diff --git a/samples/HostedInAspNet.Client/Home.cshtml b/samples/HostedInAspNet.Client/Home.cshtml new file mode 100644 index 0000000000..0ad1ea275e --- /dev/null +++ b/samples/HostedInAspNet.Client/Home.cshtml @@ -0,0 +1 @@ +

Hello, world!

diff --git a/samples/HostedInAspNet.Client/Program.cs b/samples/HostedInAspNet.Client/Program.cs index 651950b15e..1da39baeab 100644 --- a/samples/HostedInAspNet.Client/Program.cs +++ b/samples/HostedInAspNet.Client/Program.cs @@ -1,10 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNetCore.Blazor.Browser; using Microsoft.AspNetCore.Blazor.Browser.Rendering; -using Microsoft.AspNetCore.Blazor.Components; -using Microsoft.AspNetCore.Blazor.RenderTree; namespace HostedInAspNet.Client { @@ -12,20 +9,7 @@ namespace HostedInAspNet.Client { static void Main(string[] args) { - // Temporarily render this test component until there's a proper mechanism - // for testing this. - new BrowserRenderer().AddComponent("app"); - } - } - - internal class MyComponent : IComponent - { - public void Init(RenderHandle renderHandle) - { - } - - public void SetParameters(ParameterCollection parameters) - { + new BrowserRenderer().AddComponent("app"); } } }