Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.

Commit a9ddf6e

Browse files
committed
Updated to ServiceStack v5.12
1 parent c681519 commit a9ddf6e

File tree

10 files changed

+33
-32
lines changed

10 files changed

+33
-32
lines changed

MyApp.Client/Components/StackBaseComponent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public abstract class StackBaseComponent : ComponentBase
1616
[Inject]
1717
private JsonHttpClient Client {get;set;}
1818

19-
protected async Task<JsonHttpClient> GetClient() {
19+
protected async Task<JsonHttpClient> GetClientAsync() {
2020
var state = await AuthenticationStateTask;
2121
if(state.User is ClaimsPrincipal principal && principal.Identity.IsAuthenticated){
2222
Client.BearerToken = principal.Claims.Where(c => c.Type == "token").FirstOrDefault()?.Value;

MyApp.Client/MyApp.Client.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<TargetFramework>net5.0</TargetFramework>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageReference Include="ServiceStack.HttpClient" Version="5.10.5" />
7-
<PackageReference Include="Blazored.LocalStorage" Version="3.0.0" />
8-
<PackageReference Include="Blazor.Extensions.Logging" Version="1.1.1" />
9-
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.2" />
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.2" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.2" PrivateAssets="all" />
6+
<PackageReference Include="ServiceStack.HttpClient" Version="5.12.1" />
7+
<PackageReference Include="Blazored.LocalStorage" Version="4.1.2" />
8+
<PackageReference Include="Blazor.Extensions.Logging" Version="2.0.4" />
9+
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.9" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.9" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.9" PrivateAssets="all" />
1212
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
1313
<ProjectReference Include="..\MyApp.ServiceModel\MyApp.ServiceModel.csproj" />
1414
</ItemGroup>

MyApp.Client/Pages/CallHello.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
private async Task CallHelloService()
1818
{
1919

20-
var client = await GetClient();
20+
var client = await GetClientAsync();
2121
var response = await client.GetAsync(new ServiceModel.Hello() {
2222
Name = "World"
2323
});

MyApp.Client/Pages/Counter.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
{
1717
currentCount++;
1818

19-
var client = await GetClient();
19+
var client = await GetClientAsync();
2020
}
2121
}

MyApp.ServiceInterface/MyApp.ServiceInterface.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ServiceStack" Version="5.10.5" />
8+
<PackageReference Include="ServiceStack" Version="5.12.1" />
99
</ItemGroup>
1010

1111
<ItemGroup>

MyApp.ServiceModel/MyApp.ServiceModel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ServiceStack.Interfaces" Version="5.10.5" />
8+
<PackageReference Include="ServiceStack.Interfaces" Version="5.12.1" />
99
</ItemGroup>
1010

1111
<ItemGroup>

MyApp.Tests/MyApp.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<ProjectReference Include="..\MyApp.ServiceInterface\MyApp.ServiceInterface.csproj" />
1111
<ProjectReference Include="..\MyApp.ServiceModel\MyApp.ServiceModel.csproj" />
1212

13-
<PackageReference Include="NUnit" Version="3.13.1" />
14-
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
16-
<PackageReference Include="ServiceStack" Version="5.10.5" />
17-
<PackageReference Include="ServiceStack.Kestrel" Version="5.10.5" />
13+
<PackageReference Include="NUnit" Version="3.13.2" />
14+
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
16+
<PackageReference Include="ServiceStack" Version="5.12.1" />
17+
<PackageReference Include="ServiceStack.Kestrel" Version="5.12.1" />
1818
</ItemGroup>
1919

2020
</Project>

MyApp.sln

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26730.3
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31606.5
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp", "MyApp\MyApp.csproj", "{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp", "MyApp\MyApp.csproj", "{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.ServiceInterface", "MyApp.ServiceInterface\MyApp.ServiceInterface.csproj", "{5B8FFF01-1E0B-477D-9D7F-93016C128B23}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.ServiceInterface", "MyApp.ServiceInterface\MyApp.ServiceInterface.csproj", "{5B8FFF01-1E0B-477D-9D7F-93016C128B23}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.ServiceModel", "MyApp.ServiceModel\MyApp.ServiceModel.csproj", "{0127B6CA-1B79-46A6-8307-B36836D107F0}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.ServiceModel", "MyApp.ServiceModel\MyApp.ServiceModel.csproj", "{0127B6CA-1B79-46A6-8307-B36836D107F0}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Tests", "MyApp.Tests\MyApp.Tests.csproj", "{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Tests", "MyApp.Tests\MyApp.Tests.csproj", "{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Client", "MyApp.Client\MyApp.Client.csproj", "{320C1E1A-F198-420D-88DF-2D929A656551}"
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Client", "MyApp.Client\MyApp.Client.csproj", "{320C1E1A-F198-420D-88DF-2D929A656551}"
1515
EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{672D91B4-2CE5-43CA-9AEF-66E6884A6E0D}"
17-
ProjectSection(SolutionItems) = preProject
18-
NuGet.Config = NuGet.Config
19-
EndProjectSection
17+
ProjectSection(SolutionItems) = preProject
18+
NuGet.Config = NuGet.Config
19+
README.md = README.md
20+
EndProjectSection
2021
EndProject
2122
Global
2223
GlobalSection(SolutionConfigurationPlatforms) = preSolution

MyApp/MyApp.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
@@ -8,10 +8,10 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.2" />
12-
<PackageReference Include="ServiceStack" Version="5.10.5" />
13-
<PackageReference Include="ServiceStack.OrmLite.Sqlite" Version="5.10.5" />
14-
<PackageReference Include="ServiceStack.Server" Version="5.10.5" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="5.0.9" />
12+
<PackageReference Include="ServiceStack" Version="5.12.1" />
13+
<PackageReference Include="ServiceStack.OrmLite.Sqlite" Version="5.12.1" />
14+
<PackageReference Include="ServiceStack.Server" Version="5.12.1" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Blazor WASM & ServiceStack for .NET 5.0 RTM
44

5-
This template integrate ServiceStack with Blazor on .NET 5 RTM and [ServiceStack 5.10.1](https://docs.servicestack.net/releases/v5.10).
5+
This template integrate ServiceStack with Blazor on .NET 5 RTM and [ServiceStack 5.12](https://docs.servicestack.net/releases/v5.12).
66

77
The blazor wasm app is served through the main ServiceStack web host so you can deploy a single package with both api and client ux.
88

0 commit comments

Comments
 (0)