feat(all): Проекты под задачи синхронизации нарядов еспп и агентов
This commit is contained in:
21
PARR.EsppApi/EsppApiService.cs
Normal file
21
PARR.EsppApi/EsppApiService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.EsppApi.Models;
|
||||
|
||||
namespace PARR.EsppApi
|
||||
{
|
||||
internal class EsppApiService : IEsppApiService
|
||||
{
|
||||
private readonly ILogger<EsppApiService> logger;
|
||||
|
||||
public EsppApiService(ILogger<EsppApiService> logger)
|
||||
{
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<EsppOrder>> FindOrdersByPrefixAsync(string prefix)
|
||||
{
|
||||
logger.LogInformation("Привет!");
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
13
PARR.EsppApi/IEsppApiService.cs
Normal file
13
PARR.EsppApi/IEsppApiService.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using PARR.EsppApi.Models;
|
||||
|
||||
namespace PARR.EsppApi
|
||||
{
|
||||
public interface IEsppApiService
|
||||
{
|
||||
/// <summary>
|
||||
/// Найти наряды в ЕСПП по префиксу
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<EsppOrder>> FindOrdersByPrefixAsync(string prefix);
|
||||
}
|
||||
}
|
||||
9
PARR.EsppApi/Models/EsppOrder.cs
Normal file
9
PARR.EsppApi/Models/EsppOrder.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace PARR.EsppApi.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Модель наряда из еспп
|
||||
/// </summary>
|
||||
public class EsppOrder
|
||||
{
|
||||
}
|
||||
}
|
||||
21
PARR.EsppApi/PARR.EsppApi.csproj
Normal file
21
PARR.EsppApi/PARR.EsppApi.csproj
Normal file
@@ -0,0 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Settings\" />
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
21
PARR.EsppApi/ParrEsppApiInstaller.cs
Normal file
21
PARR.EsppApi/ParrEsppApiInstaller.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace PARR.EsppApi
|
||||
{
|
||||
public static class ParrEsppApiInstaller
|
||||
{
|
||||
public static void InstallEsppApiServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
// settings
|
||||
//SettingsFromDb configuration
|
||||
//var settingsFromDb = new SettingsFromDb();
|
||||
//configuration.GetSection(nameof(SettingsFromDb)).Bind(settingsFromDb);
|
||||
//services.AddSingleton(settingsFromDb);
|
||||
|
||||
services.AddTransient<IEsppApiService, EsppApiService>();
|
||||
//add other services
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user