Skip to content

Commit

Permalink
Update BlazorSample to preview 9
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSandersonMS authored and guardrex committed Sep 4, 2019
1 parent 2183f93 commit 5cfc854
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 15 deletions.
7 changes: 5 additions & 2 deletions aspnetcore/blazor/common/samples/3.x/BlazorSample/App.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Router AppAssembly="typeof(Program).Assembly">
<NotFoundContent>
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<p>Sorry, there's nothing at this address.</p>
</NotFoundContent>
</NotFound>
</Router>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview8.19405.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.0.0-preview8.19405.7" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview8.19405.7" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview9.19424.4" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview9.19424.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.0.0-preview9.19424.4" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview9.19424.4" PrivateAssets="all" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
public RenderFragment ChildContent { get; set; }

[Parameter]
public EventCallback<UIMouseEventArgs> OnClick { get; set; }
public EventCallback<MouseEventArgs> OnClick { get; set; }
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@using Microsoft.AspNetCore.Blazor.Http
@inject HttpClient Http
@inject IUriHelper UriHelper
@inject NavigationManager NavigationManager

<h2>HTTP Request Tester</h2>

Expand Down Expand Up @@ -98,7 +98,7 @@

protected override void OnInitialized()
{
_requestReferrer = UriHelper.GetAbsoluteUri();
_requestReferrer = NavigationManager.Uri;
}

private async void DoRequest()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public ExampleJsInterop(IJSRuntime jsRuntime)
_jsRuntime = jsRuntime;
}

public Task CallHelloHelperSayHello(string name)
public ValueTask<object> CallHelloHelperSayHello(string name)
{
// sayHello is implemented in wwwroot/exampleJsInterop.js
return _jsRuntime.InvokeAsync<object>(
"exampleJsFunctions.sayHello",
DotNetObjectRef.Create(new HelloHelper(name)));
DotNetObjectReference.Create(new HelloHelper(name)));
}
}
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@code {
private string messageText;

private void ShowMessage(UIMouseEventArgs e)
private void ShowMessage(MouseEventArgs e)
{
messageText = "Blaze a new trail with Blazor!";
}
Expand Down Expand Up @@ -44,7 +44,7 @@
@@code {
private string messageText;

private void ShowMessage(UIMouseEventArgs e)
private void ShowMessage(MouseEventArgs e)
{
messageText = "Blaze a new trail with Blazor!";
}
Expand All @@ -67,5 +67,5 @@
public RenderFragment ChildContent { get; set; }

[Parameter]
public EventCallback&lt;UIMouseEventArgs&gt; OnClick { get; set; }
public EventCallback&lt;MouseEventArgs&gt; OnClick { get; set; }
}</code></pre>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.JSInterop
@using BlazorSample
@using BlazorSample.Shared
Expand Down

0 comments on commit 5cfc854

Please sign in to comment.