feat(templateDistributor): шаблон проекта

This commit is contained in:
Mikhail Kuznetsov
2024-07-01 15:04:31 +10:00
parent 3a7529d9cd
commit e896191ac9
15 changed files with 303 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
<ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" />
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
using PARR.BLL.Contracts.Interfaces;
namespace PARR.TemplateDistributor.Settings
{
internal class MqSettings : IMqSettings
{
public string HostName { get; set; } = string.Empty;
public string QueueName { get; set; } = string.Empty;
public string User { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,23 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using PARR.BLL;
using PARR.DAL;
using PARR.TemplateDistributor.Settings;
namespace PARR.TemplateDistributor
{
public static class TemplateDistributorInstaller
{
public static void InstallTemplateDistributorSerivces(this IServiceCollection services, IConfiguration configuration)
{
services.InstallBllServices(configuration);
services.InstallDalServices(configuration);
var mqSettings = new MqSettings();
configuration.GetSection(nameof(MqSettings)).Bind(mqSettings);
services.AddSingleton(mqSettings);
//services.AddTransient<ITemplateSyncer, TemplateMQSyncer>();
}
}
}