Files
parr_api/PARR.EsppTemplateSync/Services/ParserService.cs

38 lines
979 B
C#

using Microsoft.Extensions.Logging;
namespace PARR.EsppTemplateSync.Services
{
internal class ParserService : IParserService
{
private readonly ILogger<ParserService> logger;
public ParserService(ILogger<ParserService> logger)
{
this.logger = logger;
}
public async Task<bool> ParseFileAsync(string path)
{
//TODO:
bool isSuccess = true;
return isSuccess;
}
public async Task<bool> ParseStringAsync(string str)
{
//TODO:
var splittedContent = str.Split(";");
var ek = splittedContent[0].Trim().Substring(1, splittedContent[0].Length - 2);
var isActive = splittedContent[1].Trim().Substring(1, splittedContent[1].Length - 2);
logger.LogInformation($"Получено сообщение: {ek}");
bool isSuccess = true;
return isSuccess;
}
}
}