diff --git a/MyApp.Client/Components/StackBaseComponent.cs b/MyApp.Client/Components/StackBaseComponent.cs index 8de540f..8429d13 100644 --- a/MyApp.Client/Components/StackBaseComponent.cs +++ b/MyApp.Client/Components/StackBaseComponent.cs @@ -16,7 +16,7 @@ public abstract class StackBaseComponent : ComponentBase [Inject] private JsonHttpClient Client {get;set;} - protected async Task GetClient() { + protected async Task GetClientAsync() { var state = await AuthenticationStateTask; if(state.User is ClaimsPrincipal principal && principal.Identity.IsAuthenticated){ Client.BearerToken = principal.Claims.Where(c => c.Type == "token").FirstOrDefault()?.Value; diff --git a/MyApp.Client/MyApp.Client.csproj b/MyApp.Client/MyApp.Client.csproj index bdda403..229a72e 100644 --- a/MyApp.Client/MyApp.Client.csproj +++ b/MyApp.Client/MyApp.Client.csproj @@ -3,12 +3,12 @@ net5.0 - - - - - - + + + + + + diff --git a/MyApp.Client/Pages/CallHello.razor b/MyApp.Client/Pages/CallHello.razor index ed47136..52190b5 100644 --- a/MyApp.Client/Pages/CallHello.razor +++ b/MyApp.Client/Pages/CallHello.razor @@ -17,7 +17,7 @@ private async Task CallHelloService() { - var client = await GetClient(); + var client = await GetClientAsync(); var response = await client.GetAsync(new ServiceModel.Hello() { Name = "World" }); diff --git a/MyApp.Client/Pages/Counter.razor b/MyApp.Client/Pages/Counter.razor index 8c27027..99830de 100644 --- a/MyApp.Client/Pages/Counter.razor +++ b/MyApp.Client/Pages/Counter.razor @@ -16,6 +16,6 @@ { currentCount++; - var client = await GetClient(); + var client = await GetClientAsync(); } } diff --git a/MyApp.ServiceInterface/MyApp.ServiceInterface.csproj b/MyApp.ServiceInterface/MyApp.ServiceInterface.csproj index 70a6bae..b391e7e 100644 --- a/MyApp.ServiceInterface/MyApp.ServiceInterface.csproj +++ b/MyApp.ServiceInterface/MyApp.ServiceInterface.csproj @@ -5,7 +5,7 @@ - + diff --git a/MyApp.ServiceModel/MyApp.ServiceModel.csproj b/MyApp.ServiceModel/MyApp.ServiceModel.csproj index 64dbd83..d32c012 100644 --- a/MyApp.ServiceModel/MyApp.ServiceModel.csproj +++ b/MyApp.ServiceModel/MyApp.ServiceModel.csproj @@ -5,7 +5,7 @@ - + diff --git a/MyApp.Tests/MyApp.Tests.csproj b/MyApp.Tests/MyApp.Tests.csproj index 87a0d73..a06c36c 100644 --- a/MyApp.Tests/MyApp.Tests.csproj +++ b/MyApp.Tests/MyApp.Tests.csproj @@ -10,11 +10,11 @@ - - - - - + + + + + diff --git a/MyApp.sln b/MyApp.sln index 9206809..df024f5 100644 --- a/MyApp.sln +++ b/MyApp.sln @@ -1,22 +1,23 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.3 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31606.5 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp", "MyApp\MyApp.csproj", "{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp", "MyApp\MyApp.csproj", "{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.ServiceInterface", "MyApp.ServiceInterface\MyApp.ServiceInterface.csproj", "{5B8FFF01-1E0B-477D-9D7F-93016C128B23}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.ServiceInterface", "MyApp.ServiceInterface\MyApp.ServiceInterface.csproj", "{5B8FFF01-1E0B-477D-9D7F-93016C128B23}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.ServiceModel", "MyApp.ServiceModel\MyApp.ServiceModel.csproj", "{0127B6CA-1B79-46A6-8307-B36836D107F0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.ServiceModel", "MyApp.ServiceModel\MyApp.ServiceModel.csproj", "{0127B6CA-1B79-46A6-8307-B36836D107F0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Tests", "MyApp.Tests\MyApp.Tests.csproj", "{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Tests", "MyApp.Tests\MyApp.Tests.csproj", "{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Client", "MyApp.Client\MyApp.Client.csproj", "{320C1E1A-F198-420D-88DF-2D929A656551}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Client", "MyApp.Client\MyApp.Client.csproj", "{320C1E1A-F198-420D-88DF-2D929A656551}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{672D91B4-2CE5-43CA-9AEF-66E6884A6E0D}" -ProjectSection(SolutionItems) = preProject - NuGet.Config = NuGet.Config -EndProjectSection + ProjectSection(SolutionItems) = preProject + NuGet.Config = NuGet.Config + README.md = README.md + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/MyApp/MyApp.csproj b/MyApp/MyApp.csproj index 363bc40..f9a6b56 100644 --- a/MyApp/MyApp.csproj +++ b/MyApp/MyApp.csproj @@ -1,4 +1,4 @@ - + net5.0 @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/README.md b/README.md index 0b3bce5..c5e784b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Blazor WASM & ServiceStack for .NET 5.0 RTM -This template integrate ServiceStack with Blazor on .NET 5 RTM and [ServiceStack 5.10.1](https://docs.servicestack.net/releases/v5.10). +This template integrate ServiceStack with Blazor on .NET 5 RTM and [ServiceStack 5.12](https://docs.servicestack.net/releases/v5.12). 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.