Skip to content

Commit

Permalink
commands + lots more
Browse files Browse the repository at this point in the history
  • Loading branch information
dlidstrom committed Nov 29, 2021
1 parent 93e1b41 commit 04844a5
Show file tree
Hide file tree
Showing 124 changed files with 812 additions and 984 deletions.
4 changes: 0 additions & 4 deletions Snittlistan.Queue.ConsoleHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ namespace Snittlistan.Queue.ConsoleHost
{
using System;
using System.Configuration;
using Npgsql.Logging;
using Snittlistan.Queue.Config;
using Snittlistan.Queue.Infrastructure;

public class Program
{
public static void Main()
{
Console.WriteLine("Press [ENTER] to start.");
_ = Console.ReadLine();
NpgsqlLogManager.Provider = new NLogLoggingProvider();
NpgsqlLogManager.IsParameterLoggingEnabled = true;
Application application = new(
(MessagingConfigSection)ConfigurationManager.GetSection("messaging"),
ConfigurationManager.AppSettings["UrlScheme"],
Expand Down
96 changes: 0 additions & 96 deletions Snittlistan.Queue.ConsoleHost/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@
"resolved": "4.7.12",
"contentHash": "cFe+YQVxghBt4hoB8IH+XVW/vyS6rWJPfWmm0rmgS/iaI3lzzFsGRzjw3VhByovLugw7Zp3kY7nVUWADCu6n2g=="
},
"EntityFramework": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "7jDmcQ3jaN5G7ZJC7Ecq161zQBs/5LqRzBdZ/I4XfmSvOwteGgNjOi30kthFador4Qjo3qUU6iOB1H04GIXrpg=="
},
"EntityFramework6.Npgsql": {
"type": "Transitive",
"resolved": "6.4.3",
"contentHash": "iZnc+FlaBaK97zGHR0KS0bnwKQ2gWPpaOoSYNHfjLZ4lr4UEPRFQnh/bpW9Q50ZbNNbDRCs+W12QyVn+sKsSwA==",
"dependencies": {
"EntityFramework": "6.4.0",
"Npgsql": "4.1.3"
}
},
"Microsoft.AspNet.WebApi.Client": {
"type": "Transitive",
"resolved": "5.2.7",
Expand All @@ -36,14 +22,6 @@
"Newtonsoft.Json": "6.0.4"
}
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "K63Y4hORbBcKLWH5wnKgzyn7TOfYzevIEwIedQHBIkmkEBA9SCqgvom+XTuE+fAFGvINGkhFItaZ2dvMGdT5iw==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"MicrosoftWebMvc": {
"type": "Transitive",
"resolved": "2.0.0",
Expand All @@ -70,83 +48,9 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "4.1.3",
"contentHash": "sWTXCb6WPPO7WEw4+1XoRqE49EdWmuyMA15LVbzV6jZgRxYWK8TbdniWMjguzmAgOZVYTmrCf+jsqPYoSqACvA==",
"dependencies": {
"System.Memory": "4.5.3",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Json": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.3",
"System.ValueTuple": "4.5.0"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "HxozeSlipUK7dAroTYwIcGwKDeOVpQnJlpVaOkBz7CM4TsE5b/tKlQBZecTjh6FzcSbxndYaxxpsBMz+wMJeyw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "BXgFO8Yi7ao7hVA/nklD0Hre1Bbce048ZqryGZVFifGNPuh+2jqF1i/jLJLMfFGZIzUOw+nCIeH24SQhghDSPw==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.0.0",
"System.Buffers": "4.5.0",
"System.Memory": "4.5.3",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Encodings.Web": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.2",
"System.ValueTuple": "4.5.0"
}
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"snittlistan.queue": {
"type": "Project",
"dependencies": {
"EntityFramework6.Npgsql": "6.4.3",
"Lindhart.Analyser.MissingAwaitWarning": "2.0.0",
"Microsoft.AspNet.WebApi.Client": "5.2.7",
"MvcContrib": "2.0.95",
Expand Down
16 changes: 0 additions & 16 deletions Snittlistan.Queue.WindowsServiceHost/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
<configuration>
<configSections>
<section name="messaging" type="Snittlistan.Queue.Config.MessagingConfigSection, Snittlistan.Queue" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework" />
</configSections>
<appSettings>
<add key="UrlScheme" value="http" />
<add key="Port" value="61026"/>
</appSettings>
<connectionStrings>
<add name="DatabaseContext" connectionString="Server=localhost;Database=snittlistan;Username=postgres;Password=postgres" providerName="Npgsql" />
</connectionStrings>
<messaging>
<queueListeners>
<!-- name attribute must be unique -->
Expand All @@ -22,18 +18,6 @@
<add name="TaskQueue" isEnabled="true" readQueue=".\Private$\taskqueue" workerThreads="1" autoCreateQueues="true" />
</queueListeners>
</messaging>
<entityFramework>
<providers>
<provider invariantName="Npgsql" type="Npgsql.NpgsqlServices, EntityFramework6.Npgsql" />
</providers>
<!-- setting the default connection factory is optional -->
<defaultConnectionFactory type="Npgsql.NpgsqlConnectionFactory, EntityFramework6.Npgsql" />
</entityFramework>
<system.data>
<DbProviderFactories>
<add name="Npgsql Provider" invariant="Npgsql" description=".NET Framework Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=4.1.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7" />
</DbProviderFactories>
</system.data>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
Expand Down
4 changes: 0 additions & 4 deletions Snittlistan.Queue.WindowsServiceHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ namespace Snittlistan.Queue.WindowsServiceHost
using System;
using System.ServiceProcess;
using NLog;
using Npgsql.Logging;
using Snittlistan.Queue.Infrastructure;

public static class Program
{
Expand All @@ -17,8 +15,6 @@ public static void Main()
try
{
Logger.Info("Starting queue service host");
NpgsqlLogManager.Provider = new NLogLoggingProvider();
NpgsqlLogManager.IsParameterLoggingEnabled = true;
Run();
}
catch (Exception ex)
Expand Down
96 changes: 0 additions & 96 deletions Snittlistan.Queue.WindowsServiceHost/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@
"resolved": "4.7.12",
"contentHash": "cFe+YQVxghBt4hoB8IH+XVW/vyS6rWJPfWmm0rmgS/iaI3lzzFsGRzjw3VhByovLugw7Zp3kY7nVUWADCu6n2g=="
},
"EntityFramework": {
"type": "Transitive",
"resolved": "6.4.0",
"contentHash": "7jDmcQ3jaN5G7ZJC7Ecq161zQBs/5LqRzBdZ/I4XfmSvOwteGgNjOi30kthFador4Qjo3qUU6iOB1H04GIXrpg=="
},
"EntityFramework6.Npgsql": {
"type": "Transitive",
"resolved": "6.4.3",
"contentHash": "iZnc+FlaBaK97zGHR0KS0bnwKQ2gWPpaOoSYNHfjLZ4lr4UEPRFQnh/bpW9Q50ZbNNbDRCs+W12QyVn+sKsSwA==",
"dependencies": {
"EntityFramework": "6.4.0",
"Npgsql": "4.1.3"
}
},
"Microsoft.AspNet.WebApi.Client": {
"type": "Transitive",
"resolved": "5.2.7",
Expand All @@ -36,14 +22,6 @@
"Newtonsoft.Json": "6.0.4"
}
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "K63Y4hORbBcKLWH5wnKgzyn7TOfYzevIEwIedQHBIkmkEBA9SCqgvom+XTuE+fAFGvINGkhFItaZ2dvMGdT5iw==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.2"
}
},
"MicrosoftWebMvc": {
"type": "Transitive",
"resolved": "2.0.0",
Expand All @@ -70,83 +48,9 @@
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"Npgsql": {
"type": "Transitive",
"resolved": "4.1.3",
"contentHash": "sWTXCb6WPPO7WEw4+1XoRqE49EdWmuyMA15LVbzV6jZgRxYWK8TbdniWMjguzmAgOZVYTmrCf+jsqPYoSqACvA==",
"dependencies": {
"System.Memory": "4.5.3",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Json": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.3",
"System.ValueTuple": "4.5.0"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "HxozeSlipUK7dAroTYwIcGwKDeOVpQnJlpVaOkBz7CM4TsE5b/tKlQBZecTjh6FzcSbxndYaxxpsBMz+wMJeyw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "BXgFO8Yi7ao7hVA/nklD0Hre1Bbce048ZqryGZVFifGNPuh+2jqF1i/jLJLMfFGZIzUOw+nCIeH24SQhghDSPw==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "4F8Xe+JIkVoDJ8hDAZ7HqLkjctN/6WItJIzQaifBwClC7wmoLSda/Sv2i6i1kycqDb3hWF4JCVbpAweyOKHEUA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.0.0",
"System.Buffers": "4.5.0",
"System.Memory": "4.5.3",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.6.0",
"System.Text.Encodings.Web": "4.6.0",
"System.Threading.Tasks.Extensions": "4.5.2",
"System.ValueTuple": "4.5.0"
}
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"snittlistan.queue": {
"type": "Project",
"dependencies": {
"EntityFramework6.Npgsql": "6.4.3",
"Lindhart.Analyser.MissingAwaitWarning": "2.0.0",
"Microsoft.AspNet.WebApi.Client": "5.2.7",
"MvcContrib": "2.0.95",
Expand Down
5 changes: 4 additions & 1 deletion Snittlistan.Queue/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public void Start()
{
foreach (QueueListenerElement listener in messagingConfigSection.QueueListeners.Listeners)
{
TaskQueueListener taskQueueListener = new(listener.CreateSettings(), urlScheme, port);
TaskQueueListener taskQueueListener = new(
listener.CreateSettings(),
urlScheme,
port);
taskQueueListener.Start();
taskQueueListeners.Add(taskQueueListener);
}
Expand Down
16 changes: 16 additions & 0 deletions Snittlistan.Queue/Commands/CommandBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#nullable enable

namespace Snittlistan.Queue.Commands
{
using System;

public abstract class CommandBase
{
public CommandBase()
{
CorrelationId = Guid.NewGuid();
}

public Guid CorrelationId { get; }
}
}
8 changes: 8 additions & 0 deletions Snittlistan.Queue/Commands/GetPlayersFromBitsCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#nullable enable

namespace Snittlistan.Queue.Commands
{
public class GetPlayersFromBitsCommand : CommandBase
{
}
}
8 changes: 8 additions & 0 deletions Snittlistan.Queue/Commands/GetRostersFromBitsCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#nullable enable

namespace Snittlistan.Queue.Commands
{
public class GetRostersFromBitsCommand : CommandBase
{
}
}
17 changes: 17 additions & 0 deletions Snittlistan.Queue/Commands/InitializeIndexesCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#nullable enable

namespace Snittlistan.Queue.Commands
{
public class InitializeIndexesCommand : CommandBase
{
public InitializeIndexesCommand(string email, string password)
{
Email = email;
Password = password;
}

public string Email { get; }

public string Password { get; }
}
}
8 changes: 8 additions & 0 deletions Snittlistan.Queue/Commands/RegisterMatchesCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#nullable enable

namespace Snittlistan.Queue.Commands
{
public class RegisterMatchesCommand : CommandBase
{
}
}
Loading

0 comments on commit 04844a5

Please sign in to comment.