-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded finished project to .NET 6 with C# 10 features
Added generated JSON Serialization Added EF compiled models
- Loading branch information
1 parent
9153460
commit 08ce819
Showing
73 changed files
with
3,061 additions
and
1,523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using System; | ||
using System.Net.Http; | ||
using System.Threading.Tasks; | ||
using BlazingPizza.Client; | ||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
|
||
namespace BlazingPizza.Client | ||
{ | ||
public class Program | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
var builder = WebAssemblyHostBuilder.CreateDefault(args); | ||
builder.RootComponents.Add<App>("#app"); | ||
var builder = WebAssemblyHostBuilder.CreateDefault(args); | ||
builder.RootComponents.Add<App>("#app"); | ||
|
||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | ||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | ||
|
||
await builder.Build().RunAsync(); | ||
} | ||
} | ||
} | ||
await builder.Build().RunAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 9 additions & 11 deletions
20
save-points/00-get-started/BlazingPizza.ComponentsLibrary/LocalStorage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
using Microsoft.JSInterop; | ||
using System.Threading.Tasks; | ||
|
||
namespace BlazingPizza.ComponentsLibrary | ||
namespace BlazingPizza.ComponentsLibrary; | ||
|
||
public static class LocalStorage | ||
{ | ||
public static class LocalStorage | ||
{ | ||
public static ValueTask<T> GetAsync<T>(IJSRuntime jsRuntime, string key) | ||
=> jsRuntime.InvokeAsync<T>("blazorLocalStorage.get", key); | ||
public static ValueTask<T> GetAsync<T>(IJSRuntime jsRuntime, string key) | ||
=> jsRuntime.InvokeAsync<T>("blazorLocalStorage.get", key); | ||
|
||
public static ValueTask SetAsync(IJSRuntime jsRuntime, string key, object value) | ||
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.set", key, value); | ||
public static ValueTask SetAsync(IJSRuntime jsRuntime, string key, object value) | ||
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.set", key, value); | ||
|
||
public static ValueTask DeleteAsync(IJSRuntime jsRuntime, string key) | ||
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.delete", key); | ||
} | ||
public static ValueTask DeleteAsync(IJSRuntime jsRuntime, string key) | ||
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.delete", key); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
save-points/00-get-started/BlazingPizza.Server/NotificationsController.cs
This file was deleted.
Oops, something went wrong.
35 changes: 15 additions & 20 deletions
35
save-points/00-get-started/BlazingPizza.Server/OidcConfigurationController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer; | ||
using Microsoft.AspNetCore.Mvc; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace BlazingPizza.Server | ||
namespace BlazingPizza.Server; | ||
|
||
public class OidcConfigurationController : Controller | ||
{ | ||
public class OidcConfigurationController : Controller | ||
{ | ||
public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider) | ||
{ | ||
ClientRequestParametersProvider = clientRequestParametersProvider; | ||
} | ||
public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider) | ||
{ | ||
ClientRequestParametersProvider = clientRequestParametersProvider; | ||
} | ||
|
||
public IClientRequestParametersProvider ClientRequestParametersProvider { get; } | ||
public IClientRequestParametersProvider ClientRequestParametersProvider { get; } | ||
|
||
[HttpGet("_configuration/{clientId}")] | ||
public IActionResult GetClientRequestParameters([FromRoute]string clientId) | ||
{ | ||
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId); | ||
return Ok(parameters); | ||
} | ||
} | ||
} | ||
[HttpGet("_configuration/{clientId}")] | ||
public IActionResult GetClientRequestParameters([FromRoute] string clientId) | ||
{ | ||
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId); | ||
return Ok(parameters); | ||
} | ||
} |
Oops, something went wrong.