Skip to content

Commit f37a310

Browse files
authored
Merge pull request #3 from DaanV2/refactor/v2
Refactor/v2
2 parents 9528ecf + 8b83b0f commit f37a310

File tree

307 files changed

+6562
-9005
lines changed

Some content is hidden

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

307 files changed

+6562
-9005
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[*.cs]
22

3-
# CA1819: Properties should not return arrays
4-
dotnet_diagnostic.CA1819.severity = none
3+
# CS1572: XML comment has a param tag, but there is no parameter by that name
4+
dotnet_diagnostic.CS1572.severity = none
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: 🔨 Auto Generating Tasks
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [main]
10+
paths:
11+
- 'Benchmark/**'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: commit-work
18+
cancel-in-progress: false
19+
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
jobs:
24+
linking:
25+
runs-on: ubuntu-latest
26+
name: Markdown files
27+
steps:
28+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29+
- name: 📦 Checkout Repository
30+
uses: actions/checkout@v3
31+
32+
# Runs a single command using the runners shell
33+
- name: 📓 Create Readmes
34+
uses: DaanV2/[email protected]
35+
with:
36+
folder: ${{github.workspace}}/Benchmark
37+
filename: README.md
38+
39+
- name: 📖 Commit changes
40+
continue-on-error: true
41+
run: |
42+
cd $GITHUB_WORKSPACE
43+
git config --global user.email "[email protected]"
44+
git config --global user.name "github"
45+
git add .
46+
git commit -m "auto: Generated Readmes"
47+
48+
- name: 🚚 Push
49+
continue-on-error: true
50+
run: git push

.github/workflows/dotnet-test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: .NET 📋 Unit test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
8+
concurrency:
9+
group: ${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
name: 🛠️ Build & 📋 Test on ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os:
19+
- windows-2019
20+
- windows-latest
21+
- ubuntu-latest
22+
- macos-latest
23+
steps:
24+
- name: 📦 Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: 🛠️ Setup .NET
28+
uses: actions/setup-dotnet@v2
29+
with:
30+
dotnet-version: 7.0.x
31+
32+
- name: 📥 Restore dependencies
33+
run: dotnet restore --verbosity normal
34+
35+
- name: 🔨 Build
36+
run: dotnet build --no-restore --verbosity normal
37+
38+
- name: 📋 Test
39+
run: dotnet test --no-restore --verbosity normal

.github/workflows/publish.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 📦 Nuget Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch: {}
7+
8+
concurrency:
9+
group: publish-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
env:
13+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
14+
15+
jobs:
16+
build:
17+
runs-on: windows-latest
18+
permissions:
19+
packages: write
20+
contents: read
21+
environment:
22+
name: Nuget Release
23+
url: https://www.nuget.org/packages/DaanV2.UUID.Net/
24+
steps:
25+
- name: 📦 Checkout repository
26+
uses: actions/checkout@v3
27+
28+
- name: 🛠️ Setup .NET
29+
uses: actions/setup-dotnet@v3
30+
with:
31+
dotnet-version: 7.0.x
32+
source-url: https://nuget.pkg.github.com/DaanV2/index.json
33+
34+
- name: 📥 Restore dependencies
35+
run: dotnet restore --verbosity normal
36+
37+
- name: 🔨 Build
38+
run: dotnet build --no-restore --verbosity normal
39+
40+
- name: 📋 Test
41+
run: dotnet test --no-restore --verbosity normal
42+
43+
- name: 📦 Create the package
44+
run: dotnet pack --configuration Release Library
45+
46+
- name: 🚚 Publish the package to GPR
47+
run: |
48+
cd ${{ github.workspace }}/Library/bin/Release/
49+
dotnet nuget push *.nupkg
50+
dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/Benchmark/bin/Debug/net7.0/Benchmark.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/Benchmark",
16+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17+
"console": "internalConsole",
18+
"stopAtEntry": false
19+
},
20+
{
21+
"name": ".NET Core Attach",
22+
"type": "coreclr",
23+
"request": "attach"
24+
}
25+
]
26+
}

.vscode/settings.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"[markdown]": {
3+
"editor.unicodeHighlight.ambiguousCharacters": false,
4+
"editor.unicodeHighlight.invisibleCharacters": false,
5+
"diffEditor.ignoreTrimWhitespace": false,
6+
"editor.wordWrap": "off",
7+
"editor.quickSuggestions": {
8+
"comments": "off",
9+
"strings": "off",
10+
"other": "off"
11+
},
12+
"cSpell.fixSpellingWithRenameProvider": true,
13+
"cSpell.advanced.feature.useReferenceProviderWithRename": true,
14+
"cSpell.advanced.feature.useReferenceProviderRemove": "/^#+\\s/"
15+
}
16+
}

.vscode/tasks.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Benchmark/Benchmark.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/Benchmark/Benchmark.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"--project",
36+
"${workspaceFolder}/Benchmark/Benchmark.csproj"
37+
],
38+
"problemMatcher": "$msCompile"
39+
}
40+
]
41+
}

DaanV2-NBT.Net.sln

Lines changed: 15 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,13 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.1.32210.238
4+
VisualStudioVersion = 17.6.33712.159
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API", "API", "{193B3F7C-7EE1-48CC-A72E-971B074045D4}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "Tests\UnitTest.csproj", "{A65E262A-D37D-4BAB-8550-A96134E1DD73}"
77
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{66E6986E-A3F3-46F9-B6E1-6CC4A586F0B1}"
9-
ProjectSection(SolutionItems) = preProject
10-
.editorconfig = .editorconfig
11-
EndProjectSection
12-
EndProject
13-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{7570FE9F-1C34-42B5-8669-2A817CB963D2}"
14-
EndProject
15-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Test - Source", "Test\Test - Source\Test - Source.shproj", "{84C21E51-BA3B-4BA0-A1EF-9D3DA0381345}"
16-
EndProject
17-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debug Test", "Debug Test", "{543373AC-F18C-46E4-9F98-E457935033BF}"
18-
EndProject
19-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "DaanV2-NBT.Net Source", "Source\DaanV2-NBT.Net Source.shproj", "{F600936B-A6C7-4F31-8907-A2D4944FEEB7}"
20-
EndProject
21-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaanV2-NBT.Net", "DaanV2-NBT.Net\DaanV2-NBT.Net.csproj", "{35B33488-E1D9-42C7-9FF8-837207AD6FF8}"
22-
EndProject
23-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Test.Net", "Test\Test.Net\Test.Net.csproj", "{A65E262A-D37D-4BAB-8550-A96134E1DD73}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library", "Library\Library.csproj", "{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}"
249
EndProject
2510
Global
26-
GlobalSection(SharedMSBuildProjectFiles) = preSolution
27-
Source\DaanV2-NBT.Net Source.projitems*{35b33488-e1d9-42c7-9ff8-837207ad6ff8}*SharedItemsImports = 5
28-
Test\Test - Source\Test - Source.projitems*{84c21e51-ba3b-4ba0-a1ef-9d3da0381345}*SharedItemsImports = 13
29-
Test\Test - Source\Test - Source.projitems*{a65e262a-d37d-4bab-8550-a96134e1dd73}*SharedItemsImports = 5
30-
Source\DaanV2-NBT.Net Source.projitems*{f600936b-a6c7-4f31-8907-a2d4944feeb7}*SharedItemsImports = 13
31-
EndGlobalSection
3211
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3312
Debug|Any CPU = Debug|Any CPU
3413
Debug|x64 = Debug|x64
@@ -38,18 +17,6 @@ Global
3817
Release|x86 = Release|x86
3918
EndGlobalSection
4019
GlobalSection(ProjectConfigurationPlatforms) = postSolution
41-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
43-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Debug|x64.ActiveCfg = Debug|x64
44-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Debug|x64.Build.0 = Debug|x64
45-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Debug|x86.ActiveCfg = Debug|x86
46-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Debug|x86.Build.0 = Debug|x86
47-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Release|x64.ActiveCfg = Release|x64
50-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Release|x64.Build.0 = Release|x64
51-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Release|x86.ActiveCfg = Release|x86
52-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8}.Release|x86.Build.0 = Release|x86
5320
{A65E262A-D37D-4BAB-8550-A96134E1DD73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5421
{A65E262A-D37D-4BAB-8550-A96134E1DD73}.Debug|Any CPU.Build.0 = Debug|Any CPU
5522
{A65E262A-D37D-4BAB-8550-A96134E1DD73}.Debug|x64.ActiveCfg = Debug|x64
@@ -62,16 +29,22 @@ Global
6229
{A65E262A-D37D-4BAB-8550-A96134E1DD73}.Release|x64.Build.0 = Release|x64
6330
{A65E262A-D37D-4BAB-8550-A96134E1DD73}.Release|x86.ActiveCfg = Release|x86
6431
{A65E262A-D37D-4BAB-8550-A96134E1DD73}.Release|x86.Build.0 = Release|x86
32+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Debug|x64.ActiveCfg = Debug|Any CPU
35+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Debug|x64.Build.0 = Debug|Any CPU
36+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Debug|x86.ActiveCfg = Debug|Any CPU
37+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Debug|x86.Build.0 = Debug|Any CPU
38+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Release|x64.ActiveCfg = Release|Any CPU
41+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Release|x64.Build.0 = Release|Any CPU
42+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Release|x86.ActiveCfg = Release|Any CPU
43+
{F1AB38F2-47D4-48E2-A468-7E29CDF687B4}.Release|x86.Build.0 = Release|Any CPU
6544
EndGlobalSection
6645
GlobalSection(SolutionProperties) = preSolution
6746
HideSolutionNode = FALSE
6847
EndGlobalSection
69-
GlobalSection(NestedProjects) = preSolution
70-
{84C21E51-BA3B-4BA0-A1EF-9D3DA0381345} = {7570FE9F-1C34-42B5-8669-2A817CB963D2}
71-
{F600936B-A6C7-4F31-8907-A2D4944FEEB7} = {193B3F7C-7EE1-48CC-A72E-971B074045D4}
72-
{35B33488-E1D9-42C7-9FF8-837207AD6FF8} = {193B3F7C-7EE1-48CC-A72E-971B074045D4}
73-
{A65E262A-D37D-4BAB-8550-A96134E1DD73} = {7570FE9F-1C34-42B5-8669-2A817CB963D2}
74-
EndGlobalSection
7548
GlobalSection(ExtensibilityGlobals) = postSolution
7649
SolutionGuid = {69C88882-8CC1-49CE-9D41-966C8B20810A}
7750
EndGlobalSection

DaanV2-NBT.Net/DaanV2-NBT.Net.csproj

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)