public static async Task <FileName> GetOriginalImageFileName(this IOriginalFileNameMappingRepository repository, FileName uniqueFileName)
        {
            var mapping = await repository.Get(uniqueFileName);

            var originalFileName = mapping.OriginalFileName;

            return(originalFileName);
        }
コード例 #2
0
        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);
        }