Skip to content

Commit 8f75515

Browse files
tibitothBalázs Ádám
authored andcommitted
Merged PR 13810: Kiinduló solution: scaffolding átmigrálva + 2 kisebb feature
+semver:minor * Átmigráltam a scaffolding projekteket ebbe az SLN-be, amiken refaktoráltam is (láthatóságokat szigorúbbra vettem, névtereket mozgattam). * Lapozásra, szűrésre, rendezésre helper metódusok az `AutSoft.Linq` csomagba * `ITimeProvider` az `AutSoft.Common` csomagba, hogy DI-ra is legyen példa
2 parents 1f6744b + c1e1607 commit 8f75515

File tree

95 files changed

+3742
-0
lines changed

Some content is hidden

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

95 files changed

+3742
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Az alábbiakból csak egy maradjon benne:
2+
3+
+semver: major
4+
+semver: minor
5+
+semver: patch
6+
+semver: none

.editorconfig

Lines changed: 585 additions & 0 deletions
Large diffs are not rendered by default.

AutSoftCore.sln

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.3.32804.467
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutSoft.All", "src\AutSoft.All\AutSoft.All.csproj", "{D5954B94-5C9C-4787-A2A6-3CC7D00EEFEA}"
6+
EndProject
7+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutSoft.Linq", "src\AutSoft.Linq\AutSoft.Linq.csproj", "{A03DAE6A-B41A-4037-B639-F973C6961BB2}"
8+
EndProject
9+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutSoft.DbScaffolding", "src\AutSoft.DbScaffolding\AutSoft.DbScaffolding.csproj", "{AF506C20-DD0A-4EA8-994E-E38ADC225962}"
10+
EndProject
11+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutSoft.DbScaffolding.Identity", "src\AutSoft.DbScaffolding.Identity\AutSoft.DbScaffolding.Identity.csproj", "{FF908529-9DDE-4DFB-ABA9-A2045E715B21}"
12+
EndProject
13+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutSoft.Common", "src\AutSoft.Core\AutSoft.Common.csproj", "{28371EF8-D3D3-40CA-AAE9-29D80AE0BF3F}"
14+
EndProject
15+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{7029D162-AEB0-4B68-A21E-90ABCD21DAD3}"
16+
ProjectSection(SolutionItems) = preProject
17+
test\.editorconfig = test\.editorconfig
18+
EndProjectSection
19+
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutSoft.Linq.Tests", "test\AutSoft.Linq.Tests\AutSoft.Linq.Tests.csproj", "{D4D62897-E6D6-484E-AE4E-F3A0347ADD88}"
21+
EndProject
22+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C46AA3F7-CBFE-428A-AA49-D1A1D40AB8A6}"
23+
EndProject
24+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{4E394277-2CC7-43A6-BB85-E13E44F27F9E}"
25+
ProjectSection(SolutionItems) = preProject
26+
.editorconfig = .editorconfig
27+
pipelines\autsoft-core-packages-cd.yml = pipelines\autsoft-core-packages-cd.yml
28+
src\Directory.Build.props = src\Directory.Build.props
29+
src\Directory.Packages.props = src\Directory.Packages.props
30+
pipelines\GitVersion.yml = pipelines\GitVersion.yml
31+
LICENSE.md = LICENSE.md
32+
README.md = README.md
33+
EndProjectSection
34+
EndProject
35+
Global
36+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
37+
Debug|Any CPU = Debug|Any CPU
38+
Release|Any CPU = Release|Any CPU
39+
EndGlobalSection
40+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
41+
{D5954B94-5C9C-4787-A2A6-3CC7D00EEFEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{D5954B94-5C9C-4787-A2A6-3CC7D00EEFEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{D5954B94-5C9C-4787-A2A6-3CC7D00EEFEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{D5954B94-5C9C-4787-A2A6-3CC7D00EEFEA}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{A03DAE6A-B41A-4037-B639-F973C6961BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{A03DAE6A-B41A-4037-B639-F973C6961BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{A03DAE6A-B41A-4037-B639-F973C6961BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{A03DAE6A-B41A-4037-B639-F973C6961BB2}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{AF506C20-DD0A-4EA8-994E-E38ADC225962}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{AF506C20-DD0A-4EA8-994E-E38ADC225962}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{AF506C20-DD0A-4EA8-994E-E38ADC225962}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{AF506C20-DD0A-4EA8-994E-E38ADC225962}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{FF908529-9DDE-4DFB-ABA9-A2045E715B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{FF908529-9DDE-4DFB-ABA9-A2045E715B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{FF908529-9DDE-4DFB-ABA9-A2045E715B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{FF908529-9DDE-4DFB-ABA9-A2045E715B21}.Release|Any CPU.Build.0 = Release|Any CPU
57+
{28371EF8-D3D3-40CA-AAE9-29D80AE0BF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
58+
{28371EF8-D3D3-40CA-AAE9-29D80AE0BF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
59+
{28371EF8-D3D3-40CA-AAE9-29D80AE0BF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
60+
{28371EF8-D3D3-40CA-AAE9-29D80AE0BF3F}.Release|Any CPU.Build.0 = Release|Any CPU
61+
{D4D62897-E6D6-484E-AE4E-F3A0347ADD88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62+
{D4D62897-E6D6-484E-AE4E-F3A0347ADD88}.Debug|Any CPU.Build.0 = Debug|Any CPU
63+
{D4D62897-E6D6-484E-AE4E-F3A0347ADD88}.Release|Any CPU.ActiveCfg = Release|Any CPU
64+
{D4D62897-E6D6-484E-AE4E-F3A0347ADD88}.Release|Any CPU.Build.0 = Release|Any CPU
65+
EndGlobalSection
66+
GlobalSection(SolutionProperties) = preSolution
67+
HideSolutionNode = FALSE
68+
EndGlobalSection
69+
GlobalSection(NestedProjects) = preSolution
70+
{D5954B94-5C9C-4787-A2A6-3CC7D00EEFEA} = {C46AA3F7-CBFE-428A-AA49-D1A1D40AB8A6}
71+
{A03DAE6A-B41A-4037-B639-F973C6961BB2} = {C46AA3F7-CBFE-428A-AA49-D1A1D40AB8A6}
72+
{AF506C20-DD0A-4EA8-994E-E38ADC225962} = {C46AA3F7-CBFE-428A-AA49-D1A1D40AB8A6}
73+
{FF908529-9DDE-4DFB-ABA9-A2045E715B21} = {C46AA3F7-CBFE-428A-AA49-D1A1D40AB8A6}
74+
{28371EF8-D3D3-40CA-AAE9-29D80AE0BF3F} = {C46AA3F7-CBFE-428A-AA49-D1A1D40AB8A6}
75+
{D4D62897-E6D6-484E-AE4E-F3A0347ADD88} = {7029D162-AEB0-4B68-A21E-90ABCD21DAD3}
76+
EndGlobalSection
77+
GlobalSection(ExtensibilityGlobals) = postSolution
78+
SolutionGuid = {E4767DF1-41A6-4BF0-A957-2718986D8BC7}
79+
EndGlobalSection
80+
EndGlobal

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2022 AutSoft
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

pipelines/GitVersion.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
mode: Mainline
2+
commit-message-incrementing: MergeMessageOnly
3+
increment: None
4+
tag-prefix: '[vV]'
5+
branches:
6+
master:
7+
increment: None
8+
release:
9+
increment: None
10+
feature:
11+
increment: None
12+
pull-request:
13+
increment: None
14+
hotfix:
15+
increment: None
16+
support:
17+
increment: None
18+
develop:
19+
increment: None
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
trigger: none
2+
3+
name: '$(GitVersion.MajorMinorPatch)'
4+
5+
pool:
6+
vmImage: 'windows-latest'
7+
8+
#variables:
9+
# vstsFeed: 'af9a044c-47df-4b2e-bae8-1ea6da771ce7'
10+
11+
steps:
12+
- task: gitversion/setup@0
13+
inputs:
14+
versionSpec: '5.x'
15+
16+
- task: gitversion/execute@0
17+
inputs:
18+
useConfigFile: true
19+
configFilePath: 'pipelines/GitVersion.yml'
20+
21+
- task: DotNetCoreCLI@2
22+
displayName: 'dotnet pack'
23+
inputs:
24+
command: pack
25+
packagesToPack: '$(Build.Repository.LocalPath)/src/**/*.csproj'
26+
27+
- task: PublishBuildArtifacts@1
28+
inputs:
29+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
30+
ArtifactName: 'packages'
31+
publishLocation: 'Container'
32+
33+
#- task: DotNetCoreCLI@2
34+
# displayName: 'DbScaffolding and DbScaffolding.Identity dotnet push'
35+
# inputs:
36+
# command: push
37+
# nuGetFeedType: 'internal'
38+
# publishVstsFeed: '$(vstsFeed)'

src/AutSoft.All/AutSoft.All.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<ProjectReference Include="..\AutSoft.DbScaffolding.Identity\AutSoft.DbScaffolding.Identity.csproj" />
11+
<ProjectReference Include="..\AutSoft.Linq\AutSoft.Linq.csproj" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using AutSoft.Common;
2+
3+
using Microsoft.Extensions.DependencyInjection;
4+
5+
namespace AutSoft.All;
6+
7+
/// <summary>
8+
/// Register all relevant services into dependency injection container
9+
/// </summary>
10+
public static class ServiceCollectionExtensions
11+
{
12+
/// <summary>
13+
/// Register all relevant services into dependency injection container
14+
/// </summary>
15+
/// <returns>Expanded service collection</returns>
16+
public static IServiceCollection AddAutSoftAll(this IServiceCollection services)
17+
{
18+
return services.AddAutSoftCommon();
19+
}
20+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
11+
</ItemGroup>
12+
13+
</Project>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
namespace AutSoft.Common.Exceptions;
2+
3+
/// <summary>
4+
/// Exception which represents business errors
5+
/// </summary>
6+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "RCS1194:Implement exception constructors.", Justification = "Custom constructors are provided")]
7+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S3925:\"ISerializable\" should be implemented correctly", Justification = "This exception will not be serialized.")]
8+
public class BusinessException : Exception
9+
{
10+
/// <summary>
11+
/// Initializes a new instance of the <see cref="BusinessException"/> class.
12+
/// </summary>
13+
/// <param name="message">Exception's message</param>
14+
/// <param name="title">Exception's title for ProblemDetails</param>
15+
/// <param name="type">Error's type identifier for ProblemDetails</param>
16+
public BusinessException(
17+
string? message,
18+
string? title = null,
19+
Uri? type = null)
20+
: this(message, null, title, type)
21+
{
22+
}
23+
24+
/// <summary>
25+
/// Initializes a new instance of the <see cref="BusinessException"/> class.
26+
/// </summary>
27+
/// <param name="message">Exception's message</param>
28+
/// <param name="innerException">Related tiggering exception</param>
29+
/// <param name="title">Exception's title for ProblemDetails</param>
30+
/// <param name="type">Error's type identifier for ProblemDetails</param>
31+
public BusinessException(
32+
string? message,
33+
Exception? innerException,
34+
string? title = null,
35+
Uri? type = null)
36+
: base(message, innerException)
37+
{
38+
Title = title;
39+
Type = type;
40+
}
41+
42+
/// <summary>
43+
/// Gets exception's title (mostly for problem details)
44+
/// </summary>
45+
public string? Title { get; }
46+
47+
/// <summary>
48+
/// Gets error's type identifier (mostly for problem details)
49+
/// </summary>
50+
public Uri? Type { get; }
51+
}

0 commit comments

Comments
 (0)