Skip to content

Commit a2799e2

Browse files
authored
Merge pull request #572 from neozhu/Code-Reformat
Codebase Refactoring for Consistent Style 🐛 Fixed MenuItem Click Issue on Mobile Devices
2 parents b91a3ea + 8728758 commit a2799e2

File tree

667 files changed

+48407
-42557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

667 files changed

+48407
-42557
lines changed

.editorconfig

Lines changed: 3723 additions & 330 deletions
Large diffs are not rendered by default.

CleanArchitecture.Blazor.nuspec

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3-
<metadata>
4-
<id>CleanArchitecture.Blazor.Solution.Template</id>
5-
<version>1.0.0-preview.17</version>
6-
<title>Clean Architecture Blazor Solution Template</title>
7-
<authors>hl.z</authors>
8-
<description>Clean Architecture Blazor Solution Template for .NET 8.</description>
9-
<summary>
10-
A Clean Architecture Blazor Server Solution Template for creating a Single-Page Application (SPA) with ASP.NET Core.
11-
</summary>
12-
<releaseNotes>
13-
1.0.0-preview.17
14-
- 🌈 support.net 8
15-
</releaseNotes>
3+
<metadata>
4+
<id>CleanArchitecture.Blazor.Solution.Template</id>
5+
<version>1.0.0-preview.17</version>
6+
<title>Clean Architecture Blazor Solution Template</title>
7+
<authors>hl.z</authors>
8+
<description>Clean Architecture Blazor Solution Template for .NET 8.</description>
9+
<summary>
10+
A Clean Architecture Blazor Server Solution Template for creating a Single-Page Application (SPA) with
11+
ASP.NET Core.
12+
</summary>
13+
<releaseNotes>
14+
1.0.0-preview.17
15+
- 🌈 support.net 8
16+
</releaseNotes>
1617

17-
<projectUrl>https://github.com/neozhu/CleanArchitectureWithBlazorServer</projectUrl>
18-
<repository type="git" url="https://github.com/neozhu/CleanArchitectureWithBlazorServer.git" branch="main" />
18+
<projectUrl>https://github.com/neozhu/CleanArchitectureWithBlazorServer</projectUrl>
19+
<repository type="git" url="https://github.com/neozhu/CleanArchitectureWithBlazorServer.git" branch="main"/>
1920

20-
<license type="expression">MIT</license>
21-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
22-
<tags>clean-architecture blazor server application project template csharp </tags>
23-
<icon>icon.png</icon>
24-
<readme>README.md</readme>
21+
<license type="expression">MIT</license>
22+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
23+
<tags>clean-architecture blazor server application project template csharp</tags>
24+
<icon>icon.png</icon>
25+
<readme>README.md</readme>
2526

26-
<packageTypes>
27-
<packageType name="Template" />
28-
</packageTypes>
29-
</metadata>
27+
<packageTypes>
28+
<packageType name="Template"/>
29+
</packageTypes>
30+
</metadata>
3031

31-
<files>
32-
<file src=".template.config\icon.png" />
33-
<file src="README.md" />
34-
<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;" />
35-
</files>
32+
<files>
33+
<file src=".template.config\icon.png"/>
34+
<file src="README.md"/>
35+
<file src=".\**" target="content"
36+
exclude=".template.config\**;*.exe\;*\bin\**;**\obj\**;**\.vs\**;**\.vscode\**;**\wwwroot\dist\**;content\Directory.Build.*;**\.git\**;**\.github\**;**\CODE_OF_CONDUCT.md;**\LICENSE;**\README.md;"/>
37+
</files>
3638

3739
</package>

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ Blazor technology.
4141
## Docker compose https deployment
4242

4343
- Create self-signed development certificates for the project
44-
- cmd: `dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\CleanArchitecture.Blazor.Server.UI.pfx -p Password@123`
44+
-
45+
cmd: `dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\CleanArchitecture.Blazor.Server.UI.pfx -p Password@123`
4546
- cmd: `dotnet dev-certs https --trust`
4647
- Manage User secrets to save the password
4748
- cmd: `dotnet user-secrets init`
@@ -52,32 +53,34 @@ Blazor technology.
5253
<div><video controls src="https://user-images.githubusercontent.com/1549611/197116874-f28414ca-7fc1-463a-b887-0754a5bb3e01.mp4" muted="false"></video></div>
5354

5455
### Install CleanArchitecture CodeGenerator For Blazor App
56+
5557
- Open Manage Extensions Search with `CleanArchitecture CodeGenerator For Blaozr App`
56-
![image](https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/555d274c-8f62-438b-ac7a-6d327e4c23c8)
58+
![image](https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/555d274c-8f62-438b-ac7a-6d327e4c23c8)
5759
- Download to Install
5860

5961
### CleanArchitecture CodeGenerator For Blazor App Repo
62+
6063
- https://github.com/neozhu/CleanArchitectureCodeGenerator
6164
- The code generator can automatically generate the standard code
6265
- Application Layer Code
63-
66+
6467
- ![image](https://user-images.githubusercontent.com/1549611/181414766-84850a90-3a21-47ed-afcf-1b5cdd602edf.png)
6568
- Domain Event
66-
69+
6770
- ![image](https://user-images.githubusercontent.com/1549611/183537303-058d6f49-fc45-4b77-8924-cc2e8266cad7.png)
6871
- Blazor UI Layer Code
69-
72+
7073
- ![image](https://user-images.githubusercontent.com/1549611/181414818-5c1c2dfc-5560-4ab2-8773-dc7c816730d4.png)
7174
- Task List
72-
75+
7376
- ![image](https://user-images.githubusercontent.com/1549611/183537444-3d1b2980-b131-4e9d-bfe1-7b475f760b57.png)
7477

7578
## How to install solution templates
7679

7780
- install the project template
7881
- run CLI: `dotnet new install ./`
7982
- run CLI: `dotnet new list`
80-
83+
8184
<img width="828" alt="image" src="https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/f23022e0-3fd6-475a-96ab-84b0d3328e4c">
8285

8386
- create a solution with the template
@@ -90,12 +93,10 @@ Blazor technology.
9093
- create a new project from Clean Architecture for Blazor Server Solution
9194
<img width="769" alt="image" src="https://github.com/neozhu/CleanArchitectureWithBlazorServer/assets/1549611/ed7eb20f-aec2-4f69-95b7-d47c2eb20428">
9295

93-
94-
95-
9696
## Why I chose Blazor Server
9797

98-
- I hate switching between C# and JavaScript at the same time in order to develop a project, which is why I opted for Blazor Server.
98+
- I hate switching between C# and JavaScript at the same time in order to develop a project, which is why I opted for
99+
Blazor Server.
99100

100101
## Characteristic
101102

docker-compose.dcproj

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
3-
<PropertyGroup Label="Globals">
4-
<ProjectVersion>2.1</ProjectVersion>
5-
<DockerTargetOS>Linux</DockerTargetOS>
6-
<ProjectGuid>6bd2ec46-fa8f-44f3-af33-903bbb347116</ProjectGuid>
7-
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
8-
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl>
9-
<DockerServiceName>dashboard</DockerServiceName>
10-
</PropertyGroup>
11-
<ItemGroup>
12-
<None Include="docker-compose.yml" />
13-
<None Include="docker-compose.override.yml" />
14-
<None Include=".dockerignore" />
15-
</ItemGroup>
16-
<ItemGroup>
17-
<None Remove="launchSettings.json" />
18-
</ItemGroup>
19-
<ItemGroup>
20-
<None Remove="src\**" />
21-
</ItemGroup>
3+
<PropertyGroup Label="Globals">
4+
<ProjectVersion>2.1</ProjectVersion>
5+
<DockerTargetOS>Linux</DockerTargetOS>
6+
<ProjectGuid>6bd2ec46-fa8f-44f3-af33-903bbb347116</ProjectGuid>
7+
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
8+
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl>
9+
<DockerServiceName>dashboard</DockerServiceName>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<None Include="docker-compose.yml"/>
13+
<None Include="docker-compose.override.yml"/>
14+
<None Include=".dockerignore"/>
15+
</ItemGroup>
16+
<ItemGroup>
17+
<None Remove="launchSettings.json"/>
18+
</ItemGroup>
19+
<ItemGroup>
20+
<None Remove="src\**"/>
21+
</ItemGroup>
2222
</Project>

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ services:
1414
#- ASPNETCORE_Kestrel__Certificates__Default__Password=Password@123
1515
#- ASPNETCORE_Kestrel__Certificates__Default__Path=/root/.aspnet/https/CleanArchitecture.Blazor.Server.UI.pfx
1616
volumes:
17-
- ${APPDATA}\microsoft\UserSecrets\:/root/.microsoft/usersecrets:ro
18-
- ~/.aspnet/https:/root/.aspnet/https:ro
17+
- ${APPDATA}\microsoft\UserSecrets\:/root/.microsoft/usersecrets:ro
18+
- ~/.aspnet/https:/root/.aspnet/https:ro
1919
ports:
2020
- "5000:80"
2121
- "5001:443"

src/Application/Common/EventHandlers/CreatedEventHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
// return Task.CompletedTask;
2020
// }
2121
//}
22+

src/Application/Common/EventHandlers/DeletedEventHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
// return Task.CompletedTask;
1919
// }
2020
//}
21+

src/Application/Common/EventHandlers/UpdatedEventHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
// return Task.CompletedTask;
1919
// }
2020
//}
21+
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
using System.Net;
2+
13
namespace CleanArchitecture.Blazor.Application.Common.ExceptionHandlers;
4+
25
public class ConflictException : ServerException
36
{
47
public ConflictException(string message)
5-
: base(message, System.Net.HttpStatusCode.Conflict)
8+
: base(message, HttpStatusCode.Conflict)
69
{
710
}
8-
}
11+
}

src/Application/Common/ExceptionHandlers/DbExceptionHandler.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ private static string[] GetErrors(DbUpdateException exception)
2929
&& exception.InnerException != null
3030
&& exception.InnerException is SqlException sqlException
3131
)
32-
{
3332
switch (sqlException.Number)
3433
{
3534
case 2627: // Unique constraint error
@@ -52,7 +51,6 @@ private static string[] GetErrors(DbUpdateException exception)
5251
errors.Add("A Missing Parameter has led to Error While Creating the record(s)!");
5352
break;
5453
}
55-
}
5654

5755

5856
return errors.ToArray();

0 commit comments

Comments
 (0)