feat(templateDistributor): шаблон проекта
This commit is contained in:
15
PARR.TemplateDistributor/PARR.TemplateDistributor.csproj
Normal file
15
PARR.TemplateDistributor/PARR.TemplateDistributor.csproj
Normal 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>
|
||||
12
PARR.TemplateDistributor/Settings/MqSettings.cs
Normal file
12
PARR.TemplateDistributor/Settings/MqSettings.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
23
PARR.TemplateDistributor/TemplateDistributorInstaller.cs
Normal file
23
PARR.TemplateDistributor/TemplateDistributorInstaller.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user