-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from nventive/feature/net7
Feature/workflows
- Loading branch information
Showing
22 changed files
with
202 additions
and
84 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore src/Content/Backend | ||
|
||
- name: Build | ||
run: dotnet build src/Content/Backend --configuration Release | ||
|
||
- name: Run tests | ||
run: dotnet test src/Content/Backend --configuration Release --no-build | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore src/Content/NetStandardComponent | ||
|
||
- name: Build | ||
run: dotnet build src/Content/NetStandardComponent --configuration Release | ||
|
||
- name: Run tests | ||
run: dotnet test src/Content/NetStandardComponent --configuration Release --no-build |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build NuGet Package | ||
run: nuget pack src/NV.Templates.nuspec -Version ${{ github.ref }} -OutputDirectory ./artifacts | ||
|
||
- name: Publish NuGet package | ||
run: nuget push ./artifacts/NV.Templates.*.nupkg ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json |
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,5 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"version": "6.0.101" | ||
"version": "6.0.407" | ||
} | ||
} |
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
12 changes: 0 additions & 12 deletions
12
...NV.Templates.Backend.Core/Framework/DependencyInjection/RegisterScopedServiceAttribute.cs
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...ckend/NV.Templates.Backend.Core/Framework/DependencyInjection/RegisterServiceAttribute.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace NV.Templates.Backend.Core.Framework.DependencyInjection | ||
{ | ||
/// <summary> | ||
/// Allows to register a service into the dependency injection service collection. | ||
/// By default, the <see cref="RegistrationModes.Interface"/> registration mode is used with a <see cref="ServiceLifetime.Transient"/> lifetime. | ||
/// </summary> | ||
/// <param name="modes">The registration modes.</param> | ||
/// <param name="lifetime">The registration lifetime.</param> | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] | ||
public sealed class RegisterServiceAttribute : Attribute | ||
{ | ||
public RegisterServiceAttribute( | ||
RegistrationModes modes = RegistrationModes.Interface, | ||
ServiceLifetime lifetime = ServiceLifetime.Transient) | ||
{ | ||
Modes = modes; | ||
Lifetime = lifetime; | ||
} | ||
|
||
public RegisterServiceAttribute(ServiceLifetime lifetime, RegistrationModes modes = RegistrationModes.Interface) | ||
: this(modes, lifetime) | ||
{ | ||
} | ||
|
||
public RegistrationModes Modes { get; } | ||
|
||
public ServiceLifetime Lifetime { get; } | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
...Templates.Backend.Core/Framework/DependencyInjection/RegisterSingletonServiceAttribute.cs
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
...Templates.Backend.Core/Framework/DependencyInjection/RegisterTransientServiceAttribute.cs
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...tent/Backend/NV.Templates.Backend.Core/Framework/DependencyInjection/RegistrationModes.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
|
||
namespace NV.Templates.Backend.Core.Framework.DependencyInjection | ||
{ | ||
[Flags] | ||
public enum RegistrationModes | ||
{ | ||
/// <summary> | ||
/// Allows to register the interface. | ||
/// </summary> | ||
Interface, | ||
|
||
/// <summary> | ||
/// Allows to register the concrete class. | ||
/// </summary> | ||
ConcreteClass, | ||
} | ||
} |
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
16 changes: 0 additions & 16 deletions
16
src/Content/Backend/NV.Templates.Backend.Core/Framework/Entities/IdGenerator.cs
This file was deleted.
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
6 changes: 3 additions & 3 deletions
6
src/Content/Backend/NV.Templates.Backend.Core/General/OperationContext.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
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
2 changes: 1 addition & 1 deletion
2
src/Content/Backend/NV.Templates.Backend.Functions/NV.Templates.Backend.Functions.csproj
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
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
Oops, something went wrong.