internal ExifToolDownload(IHttpClientHelper httpClientHelper, AppSettings appSettings, IWebLogger logger, IStorage storage) { _httpClientHelper = httpClientHelper; _appSettings = appSettings; _hostFileSystemStorage = storage; _logger = logger; }
public static void EncapsulateExceptions(this IApplicationBuilder app, string product, string layer, string defMessage) { app.UseExceptionHandler(eApp => { eApp.Run(async context => { context.Response.StatusCode = 500; context.Response.ContentType = "application/json"; IWebLogger logger = (IWebLogger)context.RequestServices.GetService(typeof(IWebLogger)); var errorCtx = context.Features.Get <IExceptionHandlerFeature>(); if (errorCtx != null) { var ex = errorCtx.Error; logger.LogException(product, layer, null, ex, null, context); var errorId = Activity.Current?.Id ?? context.TraceIdentifier; var jsonResponse = JsonConvert.SerializeObject(new CustomErrorResponse { ErrorId = errorId, Message = defMessage }); await context.Response.WriteAsync(jsonResponse, Encoding.UTF8); } }); }); }
public PackageTelemetry(IHttpClientHelper httpClientHelper, AppSettings appSettings, IWebLogger logger, IQuery query) { _httpClientHelper = httpClientHelper; _appSettings = appSettings; _logger = logger; _query = query; }
public ExifTool(IStorage sourceStorage, IStorage thumbnailStorage, AppSettings appSettings, IWebLogger logger) { _appSettings = appSettings; _iStorage = sourceStorage; _thumbnailStorage = thumbnailStorage; _logger = logger; }
private const string ExiftoolDownloadBasePathMirror = "https://qdraw.nl/special/mirror/exiftool/"; // with slash at the end public ExifToolDownload(IHttpClientHelper httpClientHelper, AppSettings appSettings, IWebLogger logger) { _httpClientHelper = httpClientHelper; _appSettings = appSettings; _hostFileSystemStorage = new StorageHostFullPathFilesystem(logger); _logger = logger; }
public ImportQueryFactory(SetupDatabaseTypes setupDatabaseTypes, IImportQuery importQuery, IConsole console, IWebLogger logger) { _setupDatabaseTypes = setupDatabaseTypes; _importQuery = importQuery; _console = console; _logger = logger; }
public static IWebLogger GetWebLogger() { lock (typeof(WebLoggers)) { if (webLogger == null) { var webLoggerType = ConfigurationManager.Get(WebLoggerConfigurations.Group, WebLoggerConfigurations.Type); if (String.Equals(webLoggerType, FileWebLoggerType, StringComparison.OrdinalIgnoreCase)) { webLogger = CreateFileWebLogger(); } //else if (String.Equals(webLoggerType, RabbitMqWebLoggerType, StringComparison.OrdinalIgnoreCase)) //{ //} var regObject = webLogger as IRegisteredObject; if (regObject != null) { HostingEnvironment.RegisterObject(regObject); } } return(webLogger); } }
public Import( ISelectorStorage selectorStorage, AppSettings appSettings, IImportQuery importQuery, IExifTool exifTool, IQuery query, IConsole console, IMetaExifThumbnailService metaExifThumbnailService, IWebLogger logger, IMemoryCache?memoryCache = null) { _importQuery = importQuery; _filesystemStorage = selectorStorage.Get(SelectorStorage.StorageServices.HostFilesystem); _subPathStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _appSettings = appSettings; _readMetaHost = new ReadMeta(_filesystemStorage, appSettings); _exifTool = exifTool; _query = query; _console = console; _metaExifThumbnailService = metaExifThumbnailService; _memoryCache = memoryCache; _logger = logger; _updateImportTransformations = new UpdateImportTransformations(logger, _exifTool, selectorStorage, appSettings); }
public DownloadPhotoController(IQuery query, ISelectorStorage selectorStorage, IWebLogger logger) { _query = query; _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _logger = logger; }
public ThumbnailService(ISelectorStorage selectorStorage, IWebLogger logger) { var iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); var thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _thumbnail = new Thumbnail(iStorage, thumbnailStorage, logger); }
public ThumbnailGenerationController(ISelectorStorage selectorStorage, IQuery query, IWebLogger logger, IWebSocketConnectionsService connectionsService) { _selectorStorage = selectorStorage; _query = query; _logger = logger; _connectionsService = connectionsService; }
internal DiskWatcher( IFileSystemWatcherWrapper fileSystemWatcherWrapper, IWebLogger logger, IQueueProcessor queueProcessor) { _fileSystemWatcherWrapper = fileSystemWatcherWrapper; _webLogger = logger; _queueProcessor = queueProcessor; }
public SearchSuggestionsInflateHostedService(IServiceScopeFactory scopeFactory, IMemoryCache memoryCache, IWebLogger logger, AppSettings appSettings = null) { _scopeFactory = scopeFactory; _memoryCache = memoryCache; _logger = logger; _appSettings = appSettings; }
public SyncSingleFile(AppSettings appSettings, IQuery query, IStorage subPathStorage, IWebLogger logger) { _appSettings = appSettings; _subPathStorage = subPathStorage; _query = query; _newItem = new NewItem(_subPathStorage, new ReadMeta(_subPathStorage, appSettings)); _logger = logger; }
public SyncRemove(AppSettings appSettings, IQuery query, IMemoryCache memoryCache, IWebLogger logger) { _appSettings = appSettings; _setupDatabaseTypes = new SetupDatabaseTypes(appSettings); _memoryCache = memoryCache; _logger = logger; _query = query; }
public ExifToolHostStorageService(ISelectorStorage selectorStorage, AppSettings appSettings, IWebLogger webLogger) { var iStorage = selectorStorage.Get(SelectorStorage.StorageServices.HostFilesystem); var thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _exifTool = new ExifTool(iStorage, thumbnailStorage, appSettings, _webLogger); _webLogger = webLogger; }
public UpdateImportTransformations(IWebLogger logger, IExifTool exifTool, ISelectorStorage selectorStorage, AppSettings appSettings) { _logger = logger; _exifTool = exifTool; _subPathStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _appSettings = appSettings; }
/// <summary> /// Query Already imported Database /// inject a scope to: /// @see: https://docs.microsoft.com/nl-nl/ef/core/miscellaneous/configuring-dbcontext#avoiding-dbcontext-threading-issues /// </summary> /// <param name="scopeFactory">to avoid threading issues with DbContext</param> /// <param name="console">console output</param> /// <param name="dbContext"></param> public ImportQuery(IServiceScopeFactory scopeFactory, IConsole console, IWebLogger logger, ApplicationDbContext dbContext = null) { _scopeFactory = scopeFactory; _console = console; _logger = logger; _dbContext = dbContext; _isConnection = TestConnection(); }
public MetaReplaceController(IMetaReplaceService metaReplaceService, IUpdateBackgroundTaskQueue queue, IRealtimeConnectionsService connectionsService, IWebLogger logger, IServiceScopeFactory scopeFactory) { _scopeFactory = scopeFactory; _metaReplaceService = metaReplaceService; _bgTaskQueue = queue; _connectionsService = connectionsService; _logger = logger; }
/// <summary>Replace meta content</summary> /// <param name="query">Starsky IQuery interface to do calls on the database</param> /// <param name="appSettings">Settings of the application</param> /// <param name="selectorStorage">storage abstraction</param> /// <param name="logger">web logger</param> public MetaReplaceService(IQuery query, AppSettings appSettings, ISelectorStorage selectorStorage, IWebLogger logger) { _query = query; _appSettings = appSettings; if (selectorStorage != null) { _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); } _logger = logger; }
public ExportService(IQuery query, AppSettings appSettings, ISelectorStorage selectorStorage, IWebLogger logger) { _appSettings = appSettings; _query = query; _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _hostFileSystemStorage = selectorStorage.Get(SelectorStorage.StorageServices.HostFilesystem); _logger = logger; }
public GeoController(IUpdateBackgroundTaskQueue queue, ISelectorStorage selectorStorage, IMemoryCache memoryCache, IWebLogger logger, IServiceScopeFactory serviceScopeFactory) { _bgTaskQueue = queue; _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _cache = memoryCache; _serviceScopeFactory = serviceScopeFactory; _logger = logger; }
public Query(ApplicationDbContext context, AppSettings appSettings, IServiceScopeFactory scopeFactory, IWebLogger logger, IMemoryCache memoryCache = null) { _context = context; _cache = memoryCache; _appSettings = appSettings; _scopeFactory = scopeFactory; _logger = logger; }
public SearchService( ApplicationDbContext context, IMemoryCache memoryCache = null, AppSettings appSettings = null, IWebLogger logger = null) { _context = context; _cache = memoryCache; _appSettings = appSettings; _logger = logger; }
public DiskWatcher(IFileSystemWatcherWrapper fileSystemWatcherWrapper, IServiceScopeFactory scopeFactory) { _fileSystemWatcherWrapper = fileSystemWatcherWrapper; var serviceProvider = scopeFactory.CreateScope().ServiceProvider; _webLogger = serviceProvider.GetService <IWebLogger>(); var memoryCache = serviceProvider.GetService <IMemoryCache>(); _queueProcessor = new QueueProcessor(scopeFactory, new SyncWatcherConnector(scopeFactory).Sync, memoryCache); }
public MetaExifThumbnailService(AppSettings appSettings, ISelectorStorage selectorStorage, IOffsetDataMetaExifThumbnail offsetDataMetaExifThumbnail, IWriteMetaThumbnailService writeMetaThumbnailService, IWebLogger logger) { _appSettings = appSettings; _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _offsetDataMetaExifThumbnail = offsetDataMetaExifThumbnail; _writeMetaThumbnailService = writeMetaThumbnailService; _logger = logger; }
public PublishController(AppSettings appSettings, IPublishPreflight publishPreflight, IWebHtmlPublishService publishService, IMetaInfo metaInfo, ISelectorStorage selectorStorage, IUpdateBackgroundTaskQueue queue, IWebLogger webLogger) { _appSettings = appSettings; _publishPreflight = publishPreflight; _publishService = publishService; _metaInfo = metaInfo; _hostStorage = selectorStorage.Get(SelectorStorage.StorageServices.HostFilesystem); _bgTaskQueue = queue; _webLogger = webLogger; }
public MetaUpdateController(IMetaPreflight metaPreflight, IMetaUpdateService metaUpdateService, IUpdateBackgroundTaskQueue queue, IWebLogger logger, IServiceScopeFactory scopeFactory) { _metaPreflight = metaPreflight; _scopeFactory = scopeFactory; _metaUpdateService = metaUpdateService; _bgTaskQueue = queue; _logger = logger; }
public GeoBackgroundTask(AppSettings appSettings, ISelectorStorage selectorStorage, IGeoLocationWrite geoLocationWrite, IMemoryCache memoryCache, IWebLogger logger, IGeoReverseLookup geoReverseLookup) { _appSettings = appSettings; _iStorage = selectorStorage.Get(SelectorStorage.StorageServices.SubPath); _thumbnailStorage = selectorStorage.Get(SelectorStorage.StorageServices.Thumbnail); _readMeta = new ReadMeta(_iStorage); _geoLocationWrite = geoLocationWrite; _logger = logger; _geoIndexGpx = new GeoIndexGpx(_appSettings, _iStorage, memoryCache); _geoReverseLookup = geoReverseLookup; }
public ManualBackgroundSyncService(ISynchronize synchronize, IQuery query, IWebSocketConnectionsService connectionsService, IMemoryCache cache, IWebLogger logger, IUpdateBackgroundTaskQueue bgTaskQueue, IServiceScopeFactory scopeFactory) { _synchronize = synchronize; _connectionsService = connectionsService; _query = query; _cache = cache; _logger = logger; _bgTaskQueue = bgTaskQueue; _scopeFactory = scopeFactory; }
public WebLoggerModule() { webLogger = WebLoggers.GetWebLogger(); }