forked from neozhu/CleanArchitectureWithBlazorServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'neozhu:main' into main
- Loading branch information
Showing
679 changed files
with
49,082 additions
and
43,410 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,37 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> | ||
<metadata> | ||
<id>CleanArchitecture.Blazor.Solution.Template</id> | ||
<version>1.0.0-preview.17</version> | ||
<title>Clean Architecture Blazor Solution Template</title> | ||
<authors>hl.z</authors> | ||
<description>Clean Architecture Blazor Solution Template for .NET 8.</description> | ||
<summary> | ||
A Clean Architecture Blazor Server Solution Template for creating a Single-Page Application (SPA) with ASP.NET Core. | ||
</summary> | ||
<releaseNotes> | ||
1.0.0-preview.17 | ||
- 🌈 support.net 8 | ||
</releaseNotes> | ||
<metadata> | ||
<id>CleanArchitecture.Blazor.Solution.Template</id> | ||
<version>1.0.0-preview.17</version> | ||
<title>Clean Architecture Blazor Solution Template</title> | ||
<authors>hl.z</authors> | ||
<description>Clean Architecture Blazor Solution Template for .NET 8.</description> | ||
<summary> | ||
A Clean Architecture Blazor Server Solution Template for creating a Single-Page Application (SPA) with | ||
ASP.NET Core. | ||
</summary> | ||
<releaseNotes> | ||
1.0.0-preview.17 | ||
- 🌈 support.net 8 | ||
</releaseNotes> | ||
|
||
<projectUrl>https://github.com/neozhu/CleanArchitectureWithBlazorServer</projectUrl> | ||
<repository type="git" url="https://github.com/neozhu/CleanArchitectureWithBlazorServer.git" branch="main" /> | ||
<projectUrl>https://github.com/neozhu/CleanArchitectureWithBlazorServer</projectUrl> | ||
<repository type="git" url="https://github.com/neozhu/CleanArchitectureWithBlazorServer.git" branch="main"/> | ||
|
||
<license type="expression">MIT</license> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<tags>clean-architecture blazor server application project template csharp </tags> | ||
<icon>icon.png</icon> | ||
<readme>README.md</readme> | ||
<license type="expression">MIT</license> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<tags>clean-architecture blazor server application project template csharp</tags> | ||
<icon>icon.png</icon> | ||
<readme>README.md</readme> | ||
|
||
<packageTypes> | ||
<packageType name="Template" /> | ||
</packageTypes> | ||
</metadata> | ||
<packageTypes> | ||
<packageType name="Template"/> | ||
</packageTypes> | ||
</metadata> | ||
|
||
<files> | ||
<file src=".template.config\icon.png" /> | ||
<file src="README.md" /> | ||
<file src=".\**" target="content" exclude=".template.config\**;*.exe\;*\bin\**;**\obj\**;**\.vs\**;**\.vscode\**;**\wwwroot\dist\**;content\Directory.Build.*;**\.git\**;**\.github\**;**\CODE_OF_CONDUCT.md;**\LICENSE;**\README.md;" /> | ||
</files> | ||
<files> | ||
<file src=".template.config\icon.png"/> | ||
<file src="README.md"/> | ||
<file src=".\**" target="content" | ||
exclude=".template.config\**;*.exe\;*\bin\**;**\obj\**;**\.vs\**;**\.vscode\**;**\wwwroot\dist\**;content\Directory.Build.*;**\.git\**;**\.github\**;**\CODE_OF_CONDUCT.md;**\LICENSE;**\README.md;"/> | ||
</files> | ||
|
||
</package> |
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,22 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectVersion>2.1</ProjectVersion> | ||
<DockerTargetOS>Linux</DockerTargetOS> | ||
<ProjectGuid>6bd2ec46-fa8f-44f3-af33-903bbb347116</ProjectGuid> | ||
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction> | ||
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl> | ||
<DockerServiceName>dashboard</DockerServiceName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="docker-compose.yml" /> | ||
<None Include="docker-compose.override.yml" /> | ||
<None Include=".dockerignore" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="launchSettings.json" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="src\**" /> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectVersion>2.1</ProjectVersion> | ||
<DockerTargetOS>Linux</DockerTargetOS> | ||
<ProjectGuid>6bd2ec46-fa8f-44f3-af33-903bbb347116</ProjectGuid> | ||
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction> | ||
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl> | ||
<DockerServiceName>dashboard</DockerServiceName> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="docker-compose.yml"/> | ||
<None Include="docker-compose.override.yml"/> | ||
<None Include=".dockerignore"/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="launchSettings.json"/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Remove="src\**"/> | ||
</ItemGroup> | ||
</Project> |
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
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 |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
// return Task.CompletedTask; | ||
// } | ||
//} | ||
|
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 |
---|---|---|
|
@@ -18,3 +18,4 @@ | |
// return Task.CompletedTask; | ||
// } | ||
//} | ||
|
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 |
---|---|---|
|
@@ -18,3 +18,4 @@ | |
// return Task.CompletedTask; | ||
// } | ||
//} | ||
|
7 changes: 5 additions & 2 deletions
7
src/Application/Common/ExceptionHandlers/ConflictException.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,8 +1,11 @@ | ||
using System.Net; | ||
|
||
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers; | ||
|
||
public class ConflictException : ServerException | ||
{ | ||
public ConflictException(string message) | ||
: base(message, System.Net.HttpStatusCode.Conflict) | ||
: base(message, HttpStatusCode.Conflict) | ||
{ | ||
} | ||
} | ||
} |
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
8 changes: 6 additions & 2 deletions
8
src/Application/Common/ExceptionHandlers/ForbiddenAccessException.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,9 +1,13 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Net; | ||
|
||
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers; | ||
|
||
public class ForbiddenException : ServerException | ||
{ | ||
public ForbiddenException(string message) : base(message,System.Net.HttpStatusCode.Forbidden) { } | ||
} | ||
public ForbiddenException(string message) : base(message, HttpStatusCode.Forbidden) | ||
{ | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
src/Application/Common/ExceptionHandlers/InternalServerException.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,8 +1,9 @@ | ||
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers; | ||
|
||
public class InternalServerException : ServerException | ||
{ | ||
public InternalServerException(string message) | ||
: base(message, System.Net.HttpStatusCode.InternalServerError) | ||
: base(message) | ||
{ | ||
} | ||
} |
13 changes: 7 additions & 6 deletions
13
src/Application/Common/ExceptionHandlers/NotFoundException.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,18 +1,19 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Net; | ||
|
||
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers; | ||
|
||
public class NotFoundException : ServerException | ||
{ | ||
|
||
|
||
public NotFoundException(string message) | ||
: base(message,System.Net.HttpStatusCode.NotFound) | ||
: base(message, HttpStatusCode.NotFound) | ||
{ | ||
} | ||
public NotFoundException(string name, object key) | ||
: base($"Entity \"{name}\" ({key}) was not found.", System.Net.HttpStatusCode.NotFound) | ||
|
||
public NotFoundException(string name, object key) | ||
: base($"Entity \"{name}\" ({key}) was not found.", HttpStatusCode.NotFound) | ||
{ | ||
} | ||
} | ||
} |
11 changes: 6 additions & 5 deletions
11
src/Application/Common/ExceptionHandlers/ServerException.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,16 +1,17 @@ | ||
using System.Net; | ||
|
||
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers; | ||
|
||
public class ServerException : Exception | ||
{ | ||
public IEnumerable<string> ErrorMessages { get; } | ||
|
||
public HttpStatusCode StatusCode { get; } | ||
|
||
public ServerException(string message, HttpStatusCode statusCode = HttpStatusCode.InternalServerError) | ||
: base(message) | ||
{ | ||
ErrorMessages = new string[] { message }; | ||
ErrorMessages = new[] { message }; | ||
StatusCode = statusCode; | ||
} | ||
|
||
public IEnumerable<string> ErrorMessages { get; } | ||
|
||
public HttpStatusCode StatusCode { get; } | ||
} |
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
8 changes: 5 additions & 3 deletions
8
src/Application/Common/ExceptionHandlers/UnauthorizedException.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,9 +1,11 @@ | ||
using System.Net; | ||
|
||
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers; | ||
|
||
public class UnauthorizedException : ServerException | ||
{ | ||
public UnauthorizedException(string message) | ||
: base(message, System.Net.HttpStatusCode.Unauthorized) | ||
: base(message, HttpStatusCode.Unauthorized) | ||
{ | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.