Пример #1
0
        public FileSystemStoreService(IConfiguration config, ILogger <FileSystemStoreService> logger, IMimeTypeService mimeTypeService)
        {
            config.GetSection("StaticFilePath").Bind(_config);

            _logger          = logger;
            _mimeTypeService = mimeTypeService;
        }
Пример #2
0
 public UpdateImageAssetCommandHandler(
     CofoundryDbContext dbContext,
     EntityAuditHelper entityAuditHelper,
     EntityTagHelper entityTagHelper,
     IImageAssetFileService imageAssetFileService,
     IImageAssetCache imageAssetCache,
     IResizedImageAssetFileService imageAssetFileCache,
     ITransactionScopeManager transactionScopeFactory,
     IMessageAggregator messageAggregator,
     ICommandExecutor commandExecutor,
     IAssetFileTypeValidator assetFileTypeValidator,
     IMimeTypeService mimeTypeService
     )
 {
     _dbContext               = dbContext;
     _entityAuditHelper       = entityAuditHelper;
     _entityTagHelper         = entityTagHelper;
     _imageAssetFileService   = imageAssetFileService;
     _imageAssetCache         = imageAssetCache;
     _imageAssetFileCache     = imageAssetFileCache;
     _transactionScopeFactory = transactionScopeFactory;
     _messageAggregator       = messageAggregator;
     _commandExecutor         = commandExecutor;
     _assetFileTypeValidator  = assetFileTypeValidator;
     _mimeTypeService         = mimeTypeService;
 }
 public DocumentAssetCommandHelper(
     CofoundryDbContext dbContext,
     IFileStoreService fileStoreService,
     ITransactionScopeManager transactionScopeFactory,
     IMimeTypeService mimeTypeService,
     IAssetFileTypeValidator assetFileTypeValidator
     )
 {
     _dbContext               = dbContext;
     _fileStoreService        = fileStoreService;
     _transactionScopeFactory = transactionScopeFactory;
     _mimeTypeService         = mimeTypeService;
     _assetFileTypeValidator  = assetFileTypeValidator;
 }
Пример #4
0
 public CofoundryAssetsController(
     IQueryExecutor queryExecutor,
     IResizedImageAssetFileService resizedImageAssetFileService,
     IImageAssetRouteLibrary imageAssetRouteLibrary,
     IMimeTypeService mimeTypeService,
     ILogger <CofoundryAssetsController> logger
     )
 {
     _queryExecutor = queryExecutor;
     _resizedImageAssetFileService = resizedImageAssetFileService;
     _imageAssetRouteLibrary       = imageAssetRouteLibrary;
     _mimeTypeService = mimeTypeService;
     _logger          = logger;
 }
Пример #5
0
        public FormFileUploadedFile(
            IFormFile formFile,
            IMimeTypeService mimeTypeService
            )
        {
            if (formFile == null)
            {
                throw new ArgumentNullException(nameof(formFile));
            }

            _formFile = formFile;

            FileName   = _formFile.FileName;
            MimeType   = mimeTypeService.MapFromFileName(_formFile.FileName, _formFile.ContentType);
            FileLength = _formFile.Length;
        }
Пример #6
0
 public CofoundryAssetsController(
     IQueryExecutor queryExecutor,
     IResizedImageAssetFileService resizedImageAssetFileService,
     IImageAssetRouteLibrary imageAssetRouteLibrary,
     IDocumentAssetRouteLibrary documentAssetRouteLibrary,
     IMimeTypeService mimeTypeService,
     ILogger <CofoundryAssetsController> logger,
     ImageAssetsSettings imageAssetsSettings,
     DocumentAssetsSettings documentAssetsSettings
     )
 {
     _queryExecutor = queryExecutor;
     _resizedImageAssetFileService = resizedImageAssetFileService;
     _imageAssetRouteLibrary       = imageAssetRouteLibrary;
     _documentAssetRouteLibrary    = documentAssetRouteLibrary;
     _mimeTypeService        = mimeTypeService;
     _logger                 = logger;
     _imageAssetsSettings    = imageAssetsSettings;
     _documentAssetsSettings = documentAssetsSettings;
 }
 public AddImageAssetCommandHandler(
     CofoundryDbContext dbContext,
     EntityAuditHelper entityAuditHelper,
     EntityTagHelper entityTagHelper,
     IImageAssetFileService imageAssetFileService,
     ITransactionScopeManager transactionScopeFactory,
     IMessageAggregator messageAggregator,
     IRandomStringGenerator randomStringGenerator,
     IAssetFileTypeValidator assetFileTypeValidator,
     IMimeTypeService mimeTypeService
     )
 {
     _dbContext               = dbContext;
     _entityAuditHelper       = entityAuditHelper;
     _entityTagHelper         = entityTagHelper;
     _imageAssetFileService   = imageAssetFileService;
     _transactionScopeFactory = transactionScopeFactory;
     _messageAggregator       = messageAggregator;
     _randomStringGenerator   = randomStringGenerator;
     _assetFileTypeValidator  = assetFileTypeValidator;
     _mimeTypeService         = mimeTypeService;
 }
 public FormFileUploadedFileFactory(
     IMimeTypeService mimeTypeService
     )
 {
     _mimeTypeService = mimeTypeService;
 }
Пример #9
0
 public MetadataService(IFileService fileService, IMimeTypeService mimeType, IEnumerable <IMetadataReader> readers)
 {
     _readers     = readers.ToImmutableArray();
     _fileService = fileService;
     _mimeType    = mimeType;
 }