From 9da95cd72e10eb7f006f34ad552f5fce637c877f Mon Sep 17 00:00:00 2001 From: barhen-pfw Date: Sat, 1 Jul 2023 21:50:53 -0500 Subject: [PATCH] Add project files. --- Biskilog_Cloud.sln | 31 ++++++++++++++++++++ ClientManager/ClientManager.csproj | 13 ++++++++ ClientManager/Program.cs | 10 +++++++ ClientManager/Properties/launchSettings.json | 11 +++++++ ClientManager/Worker.cs | 21 +++++++++++++ ClientManager/appsettings.Development.json | 8 +++++ ClientManager/appsettings.json | 8 +++++ ServerManager/Program.cs | 10 +++++++ ServerManager/Properties/launchSettings.json | 11 +++++++ ServerManager/ServerManager.csproj | 13 ++++++++ ServerManager/Worker.cs | 21 +++++++++++++ ServerManager/appsettings.Development.json | 8 +++++ ServerManager/appsettings.json | 8 +++++ 13 files changed, 173 insertions(+) create mode 100644 Biskilog_Cloud.sln create mode 100644 ClientManager/ClientManager.csproj create mode 100644 ClientManager/Program.cs create mode 100644 ClientManager/Properties/launchSettings.json create mode 100644 ClientManager/Worker.cs create mode 100644 ClientManager/appsettings.Development.json create mode 100644 ClientManager/appsettings.json create mode 100644 ServerManager/Program.cs create mode 100644 ServerManager/Properties/launchSettings.json create mode 100644 ServerManager/ServerManager.csproj create mode 100644 ServerManager/Worker.cs create mode 100644 ServerManager/appsettings.Development.json create mode 100644 ServerManager/appsettings.json diff --git a/Biskilog_Cloud.sln b/Biskilog_Cloud.sln new file mode 100644 index 0000000..63b5b11 --- /dev/null +++ b/Biskilog_Cloud.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientManager", "ClientManager\ClientManager.csproj", "{AD0879FE-FBA8-4CD1-B95A-93E0277FD40F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerManager", "ServerManager\ServerManager.csproj", "{7A6AAC33-5ED1-4CAD-AA67-E107245354B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AD0879FE-FBA8-4CD1-B95A-93E0277FD40F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD0879FE-FBA8-4CD1-B95A-93E0277FD40F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD0879FE-FBA8-4CD1-B95A-93E0277FD40F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD0879FE-FBA8-4CD1-B95A-93E0277FD40F}.Release|Any CPU.Build.0 = Release|Any CPU + {7A6AAC33-5ED1-4CAD-AA67-E107245354B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A6AAC33-5ED1-4CAD-AA67-E107245354B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A6AAC33-5ED1-4CAD-AA67-E107245354B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A6AAC33-5ED1-4CAD-AA67-E107245354B3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B70A1395-0B43-467D-83F6-552CD8A92A8B} + EndGlobalSection +EndGlobal diff --git a/ClientManager/ClientManager.csproj b/ClientManager/ClientManager.csproj new file mode 100644 index 0000000..2299ab1 --- /dev/null +++ b/ClientManager/ClientManager.csproj @@ -0,0 +1,13 @@ + + + + net7.0 + enable + enable + dotnet-ClientManager-173f3572-8fd4-498f-addd-d620cda23800 + + + + + + diff --git a/ClientManager/Program.cs b/ClientManager/Program.cs new file mode 100644 index 0000000..e0525fe --- /dev/null +++ b/ClientManager/Program.cs @@ -0,0 +1,10 @@ +using ClientManager; + +IHost host = Host.CreateDefaultBuilder(args) + .ConfigureServices(services => + { + services.AddHostedService(); + }) + .Build(); + +host.Run(); diff --git a/ClientManager/Properties/launchSettings.json b/ClientManager/Properties/launchSettings.json new file mode 100644 index 0000000..45d6b52 --- /dev/null +++ b/ClientManager/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "ClientManager": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development" + } + } + } +} diff --git a/ClientManager/Worker.cs b/ClientManager/Worker.cs new file mode 100644 index 0000000..c26a964 --- /dev/null +++ b/ClientManager/Worker.cs @@ -0,0 +1,21 @@ +namespace ClientManager +{ + public class Worker : BackgroundService + { + private readonly ILogger _logger; + + public Worker(ILogger logger) + { + _logger = logger; + } + + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + while (!stoppingToken.IsCancellationRequested) + { + _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); + await Task.Delay(1000, stoppingToken); + } + } + } +} \ No newline at end of file diff --git a/ClientManager/appsettings.Development.json b/ClientManager/appsettings.Development.json new file mode 100644 index 0000000..b2dcdb6 --- /dev/null +++ b/ClientManager/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/ClientManager/appsettings.json b/ClientManager/appsettings.json new file mode 100644 index 0000000..b2dcdb6 --- /dev/null +++ b/ClientManager/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/ServerManager/Program.cs b/ServerManager/Program.cs new file mode 100644 index 0000000..15b1d11 --- /dev/null +++ b/ServerManager/Program.cs @@ -0,0 +1,10 @@ +using ServerManager; + +IHost host = Host.CreateDefaultBuilder(args) + .ConfigureServices(services => + { + services.AddHostedService(); + }) + .Build(); + +host.Run(); diff --git a/ServerManager/Properties/launchSettings.json b/ServerManager/Properties/launchSettings.json new file mode 100644 index 0000000..5699968 --- /dev/null +++ b/ServerManager/Properties/launchSettings.json @@ -0,0 +1,11 @@ +{ + "profiles": { + "ServerManager": { + "commandName": "Project", + "dotnetRunMessages": true, + "environmentVariables": { + "DOTNET_ENVIRONMENT": "Development" + } + } + } +} diff --git a/ServerManager/ServerManager.csproj b/ServerManager/ServerManager.csproj new file mode 100644 index 0000000..3095783 --- /dev/null +++ b/ServerManager/ServerManager.csproj @@ -0,0 +1,13 @@ + + + + net7.0 + enable + enable + dotnet-ServerManager-52a85e73-fd4f-461a-8b7b-99494934c716 + + + + + + diff --git a/ServerManager/Worker.cs b/ServerManager/Worker.cs new file mode 100644 index 0000000..846bd2d --- /dev/null +++ b/ServerManager/Worker.cs @@ -0,0 +1,21 @@ +namespace ServerManager +{ + public class Worker : BackgroundService + { + private readonly ILogger _logger; + + public Worker(ILogger logger) + { + _logger = logger; + } + + protected override async Task ExecuteAsync(CancellationToken stoppingToken) + { + while (!stoppingToken.IsCancellationRequested) + { + _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); + await Task.Delay(1000, stoppingToken); + } + } + } +} \ No newline at end of file diff --git a/ServerManager/appsettings.Development.json b/ServerManager/appsettings.Development.json new file mode 100644 index 0000000..b2dcdb6 --- /dev/null +++ b/ServerManager/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/ServerManager/appsettings.json b/ServerManager/appsettings.json new file mode 100644 index 0000000..b2dcdb6 --- /dev/null +++ b/ServerManager/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.Hosting.Lifetime": "Information" + } + } +}