Compare commits
9 Commits
2
.github/config/gitversion.yml
vendored
2
.github/config/gitversion.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
next-version: 1.0.1
|
next-version: 1.1.0
|
||||||
mode: ContinuousDeployment
|
mode: ContinuousDeployment
|
||||||
assembly-versioning-scheme: MajorMinorPatch
|
assembly-versioning-scheme: MajorMinorPatch
|
||||||
assembly-file-versioning-scheme: MajorMinorPatch
|
assembly-file-versioning-scheme: MajorMinorPatch
|
||||||
|
|||||||
4
.github/workflows/push_main.yml
vendored
4
.github/workflows/push_main.yml
vendored
@@ -4,8 +4,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
#paths:
|
paths:
|
||||||
#- "TimetableDesigner.Backend.Events**"
|
- "TimetableDesigner.Backend.Events**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Mateusz Skoczek
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
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.
|
||||||
@@ -2,7 +2,16 @@
|
|||||||
|
|
||||||
namespace TimetableDesigner.Backend.Events;
|
namespace TimetableDesigner.Backend.Events;
|
||||||
|
|
||||||
public abstract class EventQueue
|
public abstract class EventQueue<TSelf> where TSelf : EventQueue<TSelf>
|
||||||
{
|
{
|
||||||
public abstract void Setup(IServiceCollection services);
|
public void Setup<TBuilder>(IServiceCollection services, TBuilder configuration)
|
||||||
|
where TBuilder : EventQueueBuilder<TSelf> =>
|
||||||
|
Setup(services, configuration.GetConnectionParameters());
|
||||||
|
|
||||||
|
public void Setup(IServiceCollection services, string connectionString)
|
||||||
|
=> Setup(services, connectionString.Split(';')
|
||||||
|
.Select(x => x.Split('='))
|
||||||
|
.ToDictionary(x => x.First(), x => x.Last()));
|
||||||
|
|
||||||
|
protected abstract void Setup(IServiceCollection services, IDictionary<string, string> connectionParameters);
|
||||||
}
|
}
|
||||||
|
|||||||
6
TimetableDesigner.Backend.Events/EventQueueBuilder.cs
Normal file
6
TimetableDesigner.Backend.Events/EventQueueBuilder.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace TimetableDesigner.Backend.Events;
|
||||||
|
|
||||||
|
public abstract class EventQueueBuilder<TQueue> where TQueue : EventQueue<TQueue>
|
||||||
|
{
|
||||||
|
public abstract IDictionary<string, string> GetConnectionParameters();
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Title>TimetableDesigner.Backend.Events</Title>
|
<Title>TimetableDesigner.Backend.Events</Title>
|
||||||
<Authors>Mateusz Skoczek</Authors>
|
<Authors>Mateusz Skoczek</Authors>
|
||||||
<PackageProjectUrl>https://github.com/TimetableDesigner/</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/TimetableDesigner</PackageProjectUrl>
|
||||||
<PackageIcon>icon.png</PackageIcon>
|
<PackageIcon>icon.png</PackageIcon>
|
||||||
<RepositoryUrl>https://github.com/TimetableDesigner/TimetableDesigner.Backend.Events</RepositoryUrl>
|
<RepositoryUrl>https://github.com/TimetableDesigner/TimetableDesigner.Backend.Events</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user