public static async Task <FileName> GetOriginalImageFileName(this IOriginalFileNameMappingRepository repository, FileName uniqueFileName) { var mapping = await repository.Get(uniqueFileName); var originalFileName = mapping.OriginalFileName; return(originalFileName); }
public LocalFileSystemImageFileRepository( ILocalFileInfoRepository localFileInfoRepository, IOriginalFileNameMappingRepository originalFileNameMappingRepository, IRootDirectoryPathProvider rootDirectoryPathProvider, IStringlyTypedPathOperator stringlyTypedPathOperator) { this.LocalFileInfoRepository = localFileInfoRepository; this.OriginalFileNameMappingRepository = originalFileNameMappingRepository; this.RootDirectoryPathProvider = rootDirectoryPathProvider; this.StringlyTypedPathOperator = stringlyTypedPathOperator; this.Setup(); }
public static async Task Add(this IOriginalFileNameMappingRepository repository, FileName uniqueFileName, FileName originalFileName) { var mapping = OriginalFileNameMapping.New(uniqueFileName, originalFileName); await repository.Add(mapping); }