public DebugPageViewModel( INavigationService navigationService, ITermsUpdateService termsUpdateService, IExposureConfigurationRepository exposureConfigurationRepository, IUserDataRepository userDataRepository, IExposureDataRepository exposureDataRepository, AbsExposureNotificationApiService exposureNotificationApiService, AbsExposureDetectionBackgroundService exposureDetectionBackgroundService, ICloseApplicationService closeApplicationService, IServerConfigurationRepository serverConfigurationRepository, ILocalNotificationService localNotificationService, ISendEventLogStateRepository sendEventLogStateRepository, IEventLogRepository eventLogRepository, IEventLogService eventLogService ) : base(navigationService) { Title = "Title:Debug"; _termsUpdateService = termsUpdateService; _exposureConfigurationRepository = exposureConfigurationRepository; _userDataRepository = userDataRepository; _exposureDataRepository = exposureDataRepository; _exposureNotificationApiService = exposureNotificationApiService; _exposureDetectionBackgroundService = exposureDetectionBackgroundService; _closeApplicationService = closeApplicationService; _serverConfigurationRepository = serverConfigurationRepository; _localNotificationService = localNotificationService; _sendEventLogStateRepository = sendEventLogStateRepository; _eventLogRepository = eventLogRepository; _eventLogService = eventLogService; }
/// <summary> /// ctor /// </summary> /// <param name="profileLogic"></param> /// <param name="messagingLogic"></param> /// <param name="logRepo"></param> public MessagingController(IUserProfileLogic profileLogic, IMessagingLogic messagingLogic, IEventLogRepository logRepo) : base(profileLogic) { _msgLogic = messagingLogic; userProfileLogic = profileLogic; _log = logRepo; }
public PageController(IPageRepository pageRepository, IEventLogRepository logger, ILinkRepository links, IMapper mapper) { _pages = pageRepository; _logger = logger; _links = links; _mapper = mapper; }
public OrderConversionLogicImpl(IOrderHistoryHeaderRepsitory historyRepository, IUnitOfWork unitOfWork, IEventLogRepository logRepo, ICatalogLogic catalogLogic) { _historyRepo = historyRepository; _uow = unitOfWork; _catalogLogic = catalogLogic; _log = logRepo; }
/// <summary> /// Download the images for all the files they claim to have /// </summary> public void DownloadImagesForProducts(IEventLogRepository log) { index = 0; _log = log; Parallel.ForEach(Products, new ParallelOptions { MaxDegreeOfParallelism = 16 }, product => { index++; if (product.Filenames.Count > 0) { string best = ChooseBestFilename(product); foreach (string filename in product.Filenames) { int trial = 0; try { GetItem(best, filename, Constants.IXONE_PRODUCTIMAGE_PREFERREDTYPE); } catch// (Exception ex) { trial++; if (trial == 1) { GetItem(best, filename, Constants.IXONE_PRODUCTIMAGE_BACKUPTYPE); } } } } if (index % 100 == 0) { _log.WriteInformationLog(string.Format(" Downloaded {0} products from Ix-One", index)); } }); }
public static void AuditChanges(DbContext context, object entity, IEventLogRepository log) { if (context == null) { throw new ArgumentNullException("context"); } if (entity == null) { throw new ArgumentNullException("entity"); } if (log == null) { throw new ArgumentNullException("log"); } DbEntityEntry entry = context.Entry(entity); var entityName = ObjectContext.GetObjectType(entity.GetType()).Name; var auditMessage = string.Format("The instance of '{0}' is '{1}' with the context.", entityName, entry.State); log.WriteInformationLog(auditMessage); if (entry.State != EntityState.Detached) { foreach (var propertyName in entry.CurrentValues.PropertyNames) { var originalValue = entry.Property(propertyName).OriginalValue; var currentValue = entry.Property(propertyName).CurrentValue; var modified = entry.Property(propertyName).IsModified; auditMessage = string.Format("The '{0}' of '{1}' was '{2}' is now '{3}' and modified is {4}.", propertyName, entityName, originalValue, currentValue, modified); log.WriteInformationLog(auditMessage); } } }
public EventLogControllerTest() { var mappingConfig = new MapperConfiguration(mc => { mc.AddProfile(new AutoMapperProfile()); }); _repository = new EventRepository(DbContext, mappingConfig.CreateMapper()); _service = new EventLogService(_repository); _controller = new EventLogController(_service); _context = new EventContext(); _testLog = _service.Salvar(new EventLog() { EventID = 0, Level = "ERROR", Title = "development.StaticOperation.Service: <failed>", CollectedBy = "yvqnygr3i1xl47wanrg2", Log = "IOException", Description = "It is thrown when an input-output operation failed or interrupted", Origin = "app.server.com.br", Environment = "Development", CreatedDate = new DateTime(2008, 5, 1, 8, 30, 52) } ); }
public SettingsPageViewModel( INavigationService navigationService, ILoggerService loggerService, IUserDataRepository userDataRepository, IExposureDataRepository exposureDataRepository, IExposureConfigurationRepository exposureConfigurationRepository, ISendEventLogStateRepository sendEventLogStateRepository, IEventLogRepository eventLogRepository, ILogFileService logFileService, AbsExposureNotificationApiService exposureNotificationApiService, ICloseApplicationService closeApplicationService, IEssentialsService essentialsService ) : base(navigationService) { Title = AppResources.SettingsPageTitle; AppVer = essentialsService.AppVersion; this.loggerService = loggerService; this.userDataRepository = userDataRepository; this.exposureDataRepository = exposureDataRepository; this.exposureConfigurationRepository = exposureConfigurationRepository; _sendEventLogStateRepository = sendEventLogStateRepository; _eventLogRepository = eventLogRepository; this.logFileService = logFileService; this.exposureNotificationApiService = exposureNotificationApiService; this.closeApplicationService = closeApplicationService; }
protected override void OnStart(string[] args) { _log = container.Resolve <IEventLogRepository>(); _log.WriteInformationLog("Service starting"); InitializeTimer(); }
public DataMaintainanceBackgroundService( ILoggerService loggerService, IEventLogRepository eventLogRepository ) : base(loggerService, eventLogRepository) { // do nothing }
public EventLogService( IEventLogRepository eventLogRepository, IMapper mapper) : base(mapper) { _eventLogRepository = eventLogRepository; }
protected AbsDataMaintainanceBackgroundService( ILoggerService loggerService, IEventLogRepository eventLogRepository) { LoggerService = loggerService; _eventLogRepository = eventLogRepository; }
/// <summary> /// OnException in GlobalExceptionFilterAttribute /// </summary> /// <param name="actionExecutedContext"></param> public override void OnException(HttpActionExecutedContext actionExecutedContext) { eventLogRepository = GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IEventLogRepository)) as IEventLogRepository; var errorMessage = string.Empty; errorMessage = GenerateDetailedErrorMessage(actionExecutedContext); if (string.IsNullOrEmpty(errorMessage)) { errorMessage = "Unhandled API Exception"; } eventLogRepository.WriteErrorLog(errorMessage, actionExecutedContext.Exception); if (actionExecutedContext.Exception.GetType().Name == typeof(InvalidApiKeyException).Name || actionExecutedContext.Exception.GetType().Name == typeof(NoApiKeyProvidedException).Name) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent("API Key Invalid or Missing") }); } else { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent("An unhandled exception has occured") }); } }
public SpecialOrderLogicImpl(IUnitOfWork unitOfWork, IEventLogRepository log, IGenericQueueRepository queue, IGenericSubscriptionQueueRepository genericSubscriptionQueue, IOrderHistoryDetailRepository detailRepo, IOrderHistoryHeaderRepsitory headerRepo, ICustomerRepository customerRepository, IMessageTemplateLogic messageTemplateLogic, IDsrLogic dsrLogic, IUserProfileLogic userProfileLogic, IUserMessagingPreferenceRepository userMessagingPreferenceRepository, IUserPushNotificationDeviceRepository userPushNotificationDeviceRepository, Func <Channel, IMessageProvider> messageProviderFactory) { _unitOfWork = unitOfWork; _log = log; _queue = queue; _genericSubscriptionQueue = genericSubscriptionQueue; _keepListening = true; _headerRepo = headerRepo; _detailRepo = detailRepo; _customerRepository = customerRepository; _messageTemplateLogic = messageTemplateLogic; _dsrLogic = dsrLogic; _userProfileLogic = userProfileLogic; _userMessagingPreferenceRepository = userMessagingPreferenceRepository; _userPushNotificationDeviceRepository = userPushNotificationDeviceRepository; _messageProviderFactory = messageProviderFactory; // subscribe to event to receive message through subscription _genericSubscriptionQueue.MessageReceived += GenericSubscriptionQueue_MessageReceived; }
public TemplatePropertyController(ITemplatePropertyRepository repo, IMapper mapper, UserManager <User> userManager, IEventLogRepository eventLogRepo) { _mapper = mapper; _repo = repo; _userManager = userManager; _eventLogRepo = eventLogRepo; }
public GenericSubscriptionQueueRepositoryImpl(IEventLogRepository logger) { _processing = false; _restartProcessing = false; _shutdown = false; _logger = logger; }
public ReportLogic(ICatalogRepository catalogRepository, IReportRepository reportRepository, IEventLogRepository eventLogRepository, ICatalogLogic catalogLogic) { _catalogLogic = catalogLogic; _catalogRepository = catalogRepository; _log = eventLogRepository; _reportRepository = reportRepository; }
/// <summary> /// ctor /// </summary> /// <param name="listServiceRepository"></param> /// <param name="profileLogic"></param> /// <param name="logRepo"></param> public ItemNoteController(IListLogic listServiceRepository, IUserProfileLogic profileLogic, INotesListLogic notesLogic, IEventLogRepository logRepo, IListService listService) : base(profileLogic) { this.listServiceRepository = listServiceRepository; _notesLogic = notesLogic; _listService = listService; _log = logRepo; }
public MonitorController(IMonitorRepository monitor, IMonitorConditionRepository monitorcondition, IEventLogRepository eventLog) { MonitorRepository = monitor; MonitorConditionRepository = monitorcondition; LogRepository = eventLog; }
public HomeController(IConfigRepository config, IEventLogRepository logger, IMapper mapper, SignInManager <User> signInManager, ILinkRepository link) { _mapper = mapper; _logger = logger; _config = config; }
public AlbumController(IEventLogRepository logger, IPhotoRepository photoRepository, IGalleryRepository gallery, IHostingEnvironment hosting) { _logger = logger; _gallery = gallery; }
public DataMaintainanceBackgroundService( ILoggerService loggerService, IEventLogRepository eventLogRepository, IDateTimeUtility dateTimeUtility ) : base(loggerService, eventLogRepository) { _dateTimeUtility = dateTimeUtility; }
public CategoriesImportLogicImpl(IStagingRepository stagingRepository, IElasticSearchRepository esRepository, IEventLogRepository eventLogRepository) { _stagingRepository = stagingRepository; _elasticSearchRepository = esRepository; _eventLog = eventLogRepository; }
public EmailClientImpl(IEventLogRepository log) { this.serviceEmailAddress = Configuration.ServiceEmailAddress; this.smtpHostName = Configuration.SMTPHostName; this.smtpSendPort = Configuration.SMTPSendPort; _log = log; }
public OrderController(DataContext context, IMapper mapper, IOrderRepository repo, UserManager <User> userManager, IEventLogRepository eventLogRepo) { _repo = repo; _mapper = mapper; _userManager = userManager; _eventLogRepo = eventLogRepo; }
public UserFeedbackLogicImpl( IUserFeedbackRepository userFeedbackRepo, IEventLogRepository eventLog ) { _userFeedbackRepo = userFeedbackRepo; _eventLog = eventLog; }
public HouseBrandsImportLogicImpl(IStagingRepository stagingRepository, IElasticSearchRepository elasticSearchRepository, IEventLogRepository eventLogRespository) { _stagingRepository = stagingRepository; _elasticSearchRepository = elasticSearchRepository; _eventLog = eventLogRespository; }
/// <summary> /// ctor /// </summary> /// <param name="cacheRepository"></param> /// <param name="profileLogic"></param> /// <param name="elRepo"></param> public CacheController(ICacheRefreshRepository cacheRepository, IUserProfileLogic profileLogic, IEventLogRepository elRepo, IListService listService, ICacheListLogic cacheListLogic) : base(profileLogic) { this.cacheRepository = cacheRepository; _listService = listService; _cacheListLogic = cacheListLogic; this._elRepo = elRepo; }
public InfraController(IActionDescriptorCollectionProvider actionDescriptorCollectionProvider, ILogger <InfraController> logger, IEventLogRepository eventLogRepository, ICoreProfilerRepository coreProfilerRepository) { this._actionDescriptorCollectionProvider = actionDescriptorCollectionProvider; _logger = logger; _eventLogRepository = eventLogRepository; _coreProfilerRepository = coreProfilerRepository; }
public UnitTypeController(IUnitTypeRepository repo, IMapper mapper, UserManager <User> userManager, IEventLogRepository eventLogRepo) { _mapper = mapper; _repo = repo; _userManager = userManager; _eventLogRepo = eventLogRepo; }