public AdminController(IUnitOfWork unitOfWork, IMapper mapper, UserManager <AppUser> userManager, IFileRepoService fileRepoService) { this.fileRepoService = fileRepoService; this.mapper = mapper; this.userManager = userManager; this.unitOfWork = unitOfWork; }
public CoursesController(IUnitOfWork unitOfWork, IMapper mapper, IPhotoService photoService, IFileRepoService fileRepoService, DataContext context) { this.context = context; this.fileRepoService = fileRepoService; this.photoService = photoService; this.mapper = mapper; this.unitOfWork = unitOfWork; }
//public UsersController(DataContext context) public UsersController(IUnitOfWork unitOfWork, IMapper mapper, IPhotoService photoService, IFileRepoService fileRepoService, DataContext context, IAccountService accountService) //public UsersController(IunitOfWork.UserRepository unitOfWork.UserRepository, IMapper mapper, IPhotoService photoService) { this.unitOfWork = unitOfWork; this.mapper = mapper; this.photoService = photoService; this.fileRepoService = fileRepoService; this._context = context; this.accountService = accountService; }
public EnrichMetadataTransformBlock( IFileRepoService sourceFileRepoService, IImageMetadataProviderService imageMetadataProviderService, IFilePathMetadataExtractService filePathMetadataExtractService) { _sourceFileRepoService = sourceFileRepoService; _imageMetadataProviderService = imageMetadataProviderService; _filePathMetadataExtractService = filePathMetadataExtractService; Block = new TransformBlock <PipelineItem, PipelineItem>(EnrichPipeLineWithMetadata); }
public CopyFileBlock(IPipelineContext context, IFileRepoService fileRepo, ITargetPathResolver targetPathResolver) { Block = new ActionBlock <PipelineItem>(async pipelineItem => { var desDirPath = targetPathResolver.ResolveTargetDirPath( context.TargetDir.FullName, pipelineItem.Descriptor, pipelineItem.FilePathMetadataInfo, pipelineItem.ImageMetaData); if (!Directory.Exists(desDirPath)) { Directory.CreateDirectory(desDirPath); } var desFilePath = Path.Combine(desDirPath, targetPathResolver.ResolveFileName( context.TargetDir.FullName, pipelineItem.Descriptor, pipelineItem.ImageMetaData)); if (fileRepo.FileExists(desFilePath)) { // Log Warning & auto rename the file var origExt = pipelineItem.Descriptor.Ext; var newExt = $"{pipelineItem.Hash.ToString("N")[^12..]}{origExt}";
public CalculateFileHashTransformBlock(IFileRepoService sourceFileRepoService) { _sourceFileRepoService = sourceFileRepoService; Block = new TransformBlock <PipelineItem, PipelineItem>(CalculateAndTransform); }
public EnumerateSourceFilesTransformToManyBlock(IFileRepoService sourceFileRepoService) { _sourceFileRepoService = sourceFileRepoService; Block = new TransformManyBlock <DirectoryInfo, PipelineItem>(Transform); }