Browse Source

Add project files.

master
barhen-pfw 2 years ago
parent
commit
9da95cd72e
  1. 31
      Biskilog_Cloud.sln
  2. 13
      ClientManager/ClientManager.csproj
  3. 10
      ClientManager/Program.cs
  4. 11
      ClientManager/Properties/launchSettings.json
  5. 21
      ClientManager/Worker.cs
  6. 8
      ClientManager/appsettings.Development.json
  7. 8
      ClientManager/appsettings.json
  8. 10
      ServerManager/Program.cs
  9. 11
      ServerManager/Properties/launchSettings.json
  10. 13
      ServerManager/ServerManager.csproj
  11. 21
      ServerManager/Worker.cs
  12. 8
      ServerManager/appsettings.Development.json
  13. 8
      ServerManager/appsettings.json

31
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

13
ClientManager/ClientManager.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-ClientManager-173f3572-8fd4-498f-addd-d620cda23800</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
</ItemGroup>
</Project>

10
ClientManager/Program.cs

@ -0,0 +1,10 @@
using ClientManager;
IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddHostedService<Worker>();
})
.Build();
host.Run();

11
ClientManager/Properties/launchSettings.json

@ -0,0 +1,11 @@
{
"profiles": {
"ClientManager": {
"commandName": "Project",
"dotnetRunMessages": true,
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}

21
ClientManager/Worker.cs

@ -0,0 +1,21 @@
namespace ClientManager
{
public class Worker : BackgroundService
{
private readonly ILogger<Worker> _logger;
public Worker(ILogger<Worker> 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);
}
}
}
}

8
ClientManager/appsettings.Development.json

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

8
ClientManager/appsettings.json

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

10
ServerManager/Program.cs

@ -0,0 +1,10 @@
using ServerManager;
IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddHostedService<Worker>();
})
.Build();
host.Run();

11
ServerManager/Properties/launchSettings.json

@ -0,0 +1,11 @@
{
"profiles": {
"ServerManager": {
"commandName": "Project",
"dotnetRunMessages": true,
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}

13
ServerManager/ServerManager.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>dotnet-ServerManager-52a85e73-fd4f-461a-8b7b-99494934c716</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
</ItemGroup>
</Project>

21
ServerManager/Worker.cs

@ -0,0 +1,21 @@
namespace ServerManager
{
public class Worker : BackgroundService
{
private readonly ILogger<Worker> _logger;
public Worker(ILogger<Worker> 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);
}
}
}
}

8
ServerManager/appsettings.Development.json

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

8
ServerManager/appsettings.json

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
Loading…
Cancel
Save