Ejemplo n.º 1
0
 public PostService(
     IStorageProviderFactory storageProviderFactory,
     ILogger <PostService> logger,
     IOptions <HikkabaConfiguration> settings,
     IBanService banService,
     ICryptoService cryptoService,
     IAudioService audioService,
     IDocumentService documentService,
     IPictureService pictureService,
     IVideoService videoService,
     IThumbnailGenerator thumbnailGenerator,
     IAttachmentCategorizer attachmentCategorizer,
     IMapper mapper,
     ApplicationDbContext context,
     UserManager <ApplicationUser> userManager,
     ICategoryToModeratorService categoryToModeratorService) : base(mapper, context, userManager)
 {
     _storageProvider            = storageProviderFactory.CreateStorageProvider();
     _logger                     = logger;
     _banService                 = banService;
     _hikkabaConfiguration       = settings.Value;
     _cryptoService              = cryptoService;
     _audioService               = audioService;
     _documentService            = documentService;
     _pictureService             = pictureService;
     _videoService               = videoService;
     _thumbnailGenerator         = thumbnailGenerator;
     _attachmentCategorizer      = attachmentCategorizer;
     _categoryToModeratorService = categoryToModeratorService;
 }
Ejemplo n.º 2
0
        public void SetStorageProvider(IStorageProviderFactory storageProviderFactory)
        {
            foreach (var counterPoco in Counters)
            {
                var context = new StorageProviderContext
                {
                    SerialNumber = SerialNumber,
                    CounterId    = counterPoco.CounterId,
                    Precision    = Precision,
                    StorageId    = counterPoco.StorageId
                };

                counterPoco.StorageProvider = storageProviderFactory.GetStorageProvider(context);
            }
        }
Ejemplo n.º 3
0
 public AdministrationService(
     ILogger <AdministrationService> logger,
     ApplicationDbContext context,
     UserManager <ApplicationUser> userManager,
     RoleManager <ApplicationRole> roleManager,
     IOptions <SeedConfiguration> seedConfOptions,
     IStorageProviderFactory storageProviderFactory,
     IMapper mapper)
 {
     _logger          = logger;
     _context         = context;
     _userManager     = userManager;
     _roleManager     = roleManager;
     _seedConfOptions = seedConfOptions;
     _mapper          = mapper;
     _storageProvider = storageProviderFactory.CreateStorageProvider();
 }
Ejemplo n.º 4
0
 public SeriesRetriever(IStorageProviderFactory storageProviderFactory)
 {
     _storageProviderFactory = storageProviderFactory ?? throw new ArgumentNullException(nameof(storageProviderFactory));
 }
Ejemplo n.º 5
0
 public LayeredStorageConnection(IStorageProviderFactory factory)
 {
     _factory = (factory ?? StorageProviderFactories.GetFactoryByProviderName("Layered")) as LayeredStorageProviderFactory;
 }
Ejemplo n.º 6
0
 public LayeredStorageConnection(string connectionString, IStorageProviderFactory factory)
     : this(factory)
 {
     this.ConnectionString = new LayeredStorageConnectionStringBuilder(connectionString).ToString();;
 }
 public ConfigurationReaderFactory()
 {
     _storageProviderFactory = new StorageProviderFactory();
     _cacheManagerFactory    = new CacheManagerFactory();
 }
Ejemplo n.º 8
0
 public AttachmentsController(IStorageProviderFactory storageProviderFactory)
 {
     _storageProvider = storageProviderFactory.CreateStorageProvider();
 }
Ejemplo n.º 9
0
 public QboxDataDumpContextFactory(ILogger <QboxDataDumpContextFactory> logger, IMiniRetriever miniRetriever, IStorageProviderFactory storageProviderFactory)
 {
     _logger                 = logger ?? throw new ArgumentNullException(nameof(logger));
     _miniRetriever          = miniRetriever ?? throw new ArgumentNullException(nameof(miniRetriever));
     _storageProviderFactory = storageProviderFactory ?? throw new ArgumentNullException(nameof(storageProviderFactory));
 }
 public LocalFileStorageConnection(IStorageProviderFactory factory)
 {
     _factory = (factory ?? StorageProviderFactories.GetFactoryByProviderName("LocalFile")) as LocalFileStorageProviderFactory;
 }