19 lines
715 B
C#
19 lines
715 B
C#
using Hcs.WebApp.Data.Hcs;
|
|
using Hcs.WebApp.Services;
|
|
|
|
namespace Hcs.WebApp.BackgroundServices.DataParsers
|
|
{
|
|
public abstract class DataParserBase(IServiceScope scope, Operation operation, IWebHostEnvironment webHostEnvironment) : IDataParser
|
|
{
|
|
protected readonly IServiceScope scope = scope;
|
|
protected readonly Operation operation = operation;
|
|
protected readonly IWebHostEnvironment webHostEnvironment = webHostEnvironment;
|
|
|
|
private FileToParseService? fileToParseService;
|
|
|
|
protected FileToParseService FileToParseService => fileToParseService ??= scope.ServiceProvider.GetRequiredService<FileToParseService>();
|
|
|
|
public abstract Task ParseAsync();
|
|
}
|
|
}
|