Пример #1
0
		public async Task<string> StaffLogin (string username, string password, IWebService webService, IErrorLog errorLog)
		{
			if (CrossConnectivity.Current.IsConnected) {
				return await StaffMemberDAL.StaffLogin (username, password, webService, errorLog);
			} else {
				return "Not connected";
			}
		}
Пример #2
0
        public static IAppBuilder UseElmo(this IAppBuilder app, IErrorLog errorLog)
        {
            if (errorLog == null)
                throw new ArgumentNullException(nameof(errorLog));

            app.Properties.Add(ElmoConstants.ErrorLogPropertyKey, errorLog);
            return app.Use<ElmoMiddleware>(app, errorLog);
        }
Пример #3
0
 public Interactor()
 {
     like_dispatch = V7Data.V7Object;
     like_asyncevent = V7Data.AsyncEvent;
     like_errorlog = V7Data.ErrorLog;
     like_statusline = V7Data.StatusLine;
     like_extwndssupport = V7Data.ExtWndsSupport;
     like_propertyprofile = V7Data.PropertyProfile;
 }
Пример #4
0
		public AwardCalculator(IAwardCalculationQueueRepository awardCalcRepository, IEventDefinitionService eventDefinitionService, IUserRepository userRepository, IErrorLog errorLog, IAwardDefinitionService awardDefinitionService, IUserAwardService userAwardService, IPointLedgerRepository pointLedgerRepository)
		{
			_awardCalcRepository = awardCalcRepository;
			_eventDefinitionService = eventDefinitionService;
			_userRepository = userRepository;
			_errorLog = errorLog;
			_awardDefinitionService = awardDefinitionService;
			_userAwardService = userAwardService;
			_pointLedgerRepository = pointLedgerRepository;
		}
        /// <summary>
        /// get error log instance
        /// </summary>
        /// <returns>error log</returns>
        public IErrorLog GetErrorLogInstance()
        {
            switch (LogDestination)
            {
                case "file":
                    this.LogInstance = new LogToFile();
                    break;
                case "db":
                    this.LogInstance = new LogToDb();
                    break;
            }

            return this.LogInstance;
        }
Пример #6
0
        public void DoIndex(ISearchService searchService, ISettingsManager settingsManager, IPostService postService,
                            IConfig config, ITopicService topicService, IErrorLog errorLog)
        {
            var topic = searchService.GetNextTopicForIndexing();

            if (topic != null)
            {
                var serviceClient = new SearchServiceClient(config.SearchUrl, new SearchCredentials(config.SearchKey));
                if (!serviceClient.Indexes.Exists(IndexName))
                {
                    CreateIndex(serviceClient);
                }

                var posts       = postService.GetPosts(topic, false).ToArray();
                var searchTopic = new SearchTopic
                {
                    TopicID       = topic.TopicID.ToString(),
                    ForumID       = topic.ForumID,
                    Title         = topic.Title,
                    LastPostTime  = topic.LastPostTime,
                    StartedByName = topic.StartedByName,
                    Replies       = topic.ReplyCount,
                    Views         = topic.ViewCount,
                    IsClosed      = topic.IsClosed,
                    IsPinned      = topic.IsPinned,
                    UrlName       = topic.UrlName,
                    LastPostName  = topic.LastPostName,
                    Posts         = posts
                };

                var actions = new []
                {
                    IndexAction.Upload(searchTopic)
                };
                var batch = IndexBatch.New(actions);
                try
                {
                    var serviceIndexClient = new SearchIndexClient(config.SearchUrl, IndexName, new SearchCredentials(config.SearchKey));
                    serviceIndexClient.Documents.Index(batch);
                    searchService.MarkTopicAsIndexed(topic);
                }
                catch (Exception exc)
                {
                    errorLog.Log(exc, ErrorSeverity.Error);
                    topicService.MarkTopicForIndexing(topic.TopicID);
                }
            }
        }
Пример #7
0
		public void IndexNextTopic(ISearchService searchService, ISettingsManager settingsManager, IPostService postService, IErrorLog errorLog)
		{
			if (!Monitor.TryEnter(_syncRoot)) return;
			try
			{
				DoIndex(searchService, settingsManager, postService);
			}
			catch (Exception exc)
			{
				errorLog.Log(exc, ErrorSeverity.Error);
			}
			finally
			{
				Monitor.Exit(_syncRoot);
			}
		}
		public void CleanUpExpiredSessions(IUserSessionService sessionService, IErrorLog errorLog)
		{
			if (!Monitor.TryEnter(_syncRoot)) return;
			try
			{
				sessionService.CleanUpExpiredSessions();
			}
			catch (Exception exc)
			{
				errorLog.Log(exc, ErrorSeverity.Error);
			}
			finally
			{
				Monitor.Exit(_syncRoot);
			}
		}
Пример #9
0
 public ICRRepository(IICRWorkListRepository IICRWorkListRepository, IDataRepository <ItemProfile> itemProfileContext,
                      IDataRepository <IcrQuantity> icrQuantityContext, IDataRepository <IcrPrice> icrPriceContext, IDataRepository <IcrDetail> icrDetailContext,
                      IDataRepository <WorkFlowLog> workFlowLogContext, IDataRepository <ItemQuantity> itemQuantityContext,
                      IWorkFlowDetailsRepository IWorkFlowDetailsRepository, IDataRepository <WorkFlowDetail> workFlowContext, IErrorLog errorLog)
 {
     _itemQuantityContext        = itemQuantityContext;
     _icrDetailContext           = icrDetailContext;
     _icrPriceContext            = icrPriceContext;
     _icrQuantityContext         = icrQuantityContext;
     _workFlowContext            = workFlowContext;
     _workFlowLogContext         = workFlowLogContext;
     _IICRWorkListRepository     = IICRWorkListRepository;
     _IWorkFlowDetailsRepository = IWorkFlowDetailsRepository;
     _itemProfileContext         = itemProfileContext;
     _errorLog = errorLog;
 }
Пример #10
0
		public void ProcessCalculation(IAwardCalculator calculator, IErrorLog errorLog)
		{
			if (!Monitor.TryEnter(_syncRoot)) return;
			try
			{
				calculator.ProcessOneCalculation();
			}
			catch (Exception exc)
			{
				errorLog.Log(exc, ErrorSeverity.Error);
			}
			finally
			{
				Monitor.Exit(_syncRoot);
			}
		}
 public IncidentReportRepository(IErrorLog errorLog, IDataRepository <DomainModel.Models.IncidentReport.PosIncidentReport> posIncidentReportDataRepository, IDataRepository <ItemProfile> itemProfileContext, IDataRepository <ItemQuantity> itemQuantityContext, IDataRepository <WorkFlowDetail> workFlowDetailContext, IDataRepository <ConditionalOperator> conditionalOperatorContext,
                                 IDataRepository <ParentRecord> parentRecordContext, IDataRepository <WorkFlowLog> workFLowLogContext, IDataRepository <UserDetail> userDetailContext,
                                 IDataRepository <IncidentReport> incidentReportContext, IDataRepository <CashierIncidentReport> cashierIncidentReportContext)
 {
     _errorLog = errorLog;
     _incidentReportContext           = incidentReportContext;
     _cashierIncidentReportContext    = cashierIncidentReportContext;
     _posIncidentReportDataRepository = posIncidentReportDataRepository;
     _itemProfileContext         = itemProfileContext;
     _itemQuantityContext        = itemQuantityContext;
     _workFlowDetailContext      = workFlowDetailContext;
     _conditionalOperatorContext = conditionalOperatorContext;
     _parentRecordContext        = parentRecordContext;
     _workFLowLogContext         = workFLowLogContext;
     _userDetailContext          = userDetailContext;
 }
Пример #12
0
 public SupplierPOWorkListRepository(IDataRepository <SupplierPurchaseOrderLog> supplierPurchaseOrderLogContext, IWorkFlowDetailsRepository iWorkFlowDetailsRepository, IDataRepository <IcrDetail> icrDetailContext, IDataRepository <BranchDetail> branchDetailContext, IDataRepository <PurchaseOrderBranch> purchaseOrderBranchContext, IDataRepository <WorkFlowDetail> workFlowContext, IDataRepository <WorkFlowLog> workFlowLogContext, IDataRepository <UserDetail> userDetailContext, IDataRepository <ItemProfile> itemProfileContext, IDataRepository <ItemQuantity> itemQuantityContext, IDataRepository <SupplierPurchaseOrder> supplierPOContext, IDataRepository <PurchaseOrderItem> purchaseOrderItemContext, IErrorLog errorLog)
 {
     _icrDetailContext                = icrDetailContext;
     _userDetailContext               = userDetailContext;
     _itemProfileContext              = itemProfileContext;
     _itemQuantityContext             = itemQuantityContext;
     _supplierPOContext               = supplierPOContext;
     _supplierPurchaseOrderLogContext = supplierPurchaseOrderLogContext;
     _purchaseOrderItemContext        = purchaseOrderItemContext;
     _purchaseOrderBranchContext      = purchaseOrderBranchContext;
     _branchDetailContext             = branchDetailContext;
     _workFlowLogContext              = workFlowLogContext;
     _workFlowContext            = workFlowContext;
     _iWorkFlowDetailsRepository = iWorkFlowDetailsRepository;
     _errorLog = errorLog;
 }
Пример #13
0
 public POSProcessRepository(IErrorLog errorLog, IDataRepository <POSTempTrans> posTempTransContext, IDataRepository <POSTempTransItem> posTempTransItemContext,
                             IDataRepository <POSBillItem> posBillItemContext, IDataRepository <POSBillPayment> posBillPaymentContext, IDataRepository <POSSession> posSessionContext,
                             IDataRepository <POSReturnBill> posReturnBillContext, IDataRepository <POSBill> posBill, IDataRepository <GlobalizationDetail> globalizationContext,
                             IDataRepository <Language> languageDataRepository, IDataRepository <SecondaryLanguage> secondaryLanguageContext)
 {
     _errorLog                 = errorLog;
     _posTempTransContext      = posTempTransContext;
     _posTempTransItemContext  = posTempTransItemContext;
     _posBillItemContext       = posBillItemContext;
     _posBillPaymentContext    = posBillPaymentContext;
     _posSessionContext        = posSessionContext;
     _posReturnBillContext     = posReturnBillContext;
     _posBillContext           = posBill;
     _globalizationContext     = globalizationContext;
     _secondaryLanguageContext = secondaryLanguageContext;
     _languageDataRepository   = languageDataRepository;
 }
Пример #14
0
        public PageHeadCollection(
            IFileSet fileSet,
            IStartupLog startupLog,
            IErrorLog errorLog,
            IPagePool pagePool)
        {
            _pages      = new Dictionary <ulong, PageHead>();
            _fileSet    = fileSet;
            _startupLog = startupLog;
            _errorLog   = errorLog;
            _pagePool   = pagePool;

            _cleanupThread = new Thread(() =>
            {
                _startupLog.WriteLine("Stale page clean up thread starting");

                while (!_disposing)
                {
                    try
                    {
                        Thread.Sleep(50);

                        // TODO: Delete pages that have not been touched for a while and
                        //       have no cached versions
                    }
                    catch (ThreadAbortException)
                    {
                        return;
                    }
                    catch (Exception ex)
                    {
                        _errorLog.WriteLine("Exception in page collection cleanup thread. " + ex.Message, ex);
                    }
                }

                _startupLog.WriteLine("Stale page clean up thread exiting");
            })
            {
                IsBackground = true,
                Name         = "Page collection cleanup",
                Priority     = ThreadPriority.AboveNormal
            };

            _cleanupThread.Start();
        }
Пример #15
0
        /// <summary>
        /// Инициализация компонента
        /// </summary>
        /// <param name="connection">reference to IDispatch</param>
        HRESULT IInitDone.Init(object connection)
        {
            try
            {
                // _asyncEvent = (IAsyncEvent)connection;
                // _statusLine = (IStatusLine)connection;
                _errorLog = (IErrorLog)connection;

                Init(connection);

                return(HRESULT.S_OK);
            }
            catch (Exception ex)
            {
                Error(ex.ToString());
                return(HRESULT.E_FAIL);
            }
        }
        public ElasticSearchClientWrapper(IConfig config, IErrorLog errorLog, ITenantService tenantService)
        {
            _errorLog      = errorLog;
            _tenantService = tenantService;
            var node     = new Uri(config.SearchUrl);
            var settings = new ConnectionSettings(node)
                           .DefaultIndex(IndexName).DisableDirectStreaming();

            if (!string.IsNullOrEmpty(config.SearchKey))
            {
                var pair = config.SearchKey.Split("|");
                if (pair.Length == 2)
                {
                    settings.ApiKeyAuthentication(pair[0], pair[1]);
                }
            }
            _client = new ElasticClient(settings);
        }
Пример #17
0
		protected internal AdminController(IUserService userService, IProfileService profileService, ISettingsManager settingsManager, ICategoryService categoryService, IForumService forumService, ISearchService searchService, ISecurityLogService securityLogService, IErrorLog errorLog, IBanService banService, IModerationLogService modLogService, IIPHistoryService ipHistoryService, IImageService imageService, IMailingListService mailingListService, IEventDefinitionService eventDefinitionService, IAwardDefinitionService awardDefinitionService, IEventPublisher eventPublisher)
		{
			_userService = userService;
			_profileService = profileService;
			_settingsManager = settingsManager;
			_categoryService = categoryService;
			_forumService = forumService;
			_searchService = searchService;
			_securityLogService = securityLogService;
			_errorLogService = errorLog;
			_banService = banService;
			_moderationLogService = modLogService;
			_ipHistoryService = ipHistoryService;
			_imageService = imageService;
			_mailingListService = mailingListService;
			_eventDefinitionService = eventDefinitionService;
			_awardDefinitionService = awardDefinitionService;
			_eventPublisher = eventPublisher;
		}
Пример #18
0
 public void CloseOldTopics(ITopicService topicService, IErrorLog errorLog)
 {
     if (!Monitor.TryEnter(_syncRoot))
     {
         return;
     }
     try
     {
         topicService.CloseAgedTopics();
     }
     catch (Exception exc)
     {
         errorLog.Log(exc, ErrorSeverity.Error);
     }
     finally
     {
         Monitor.Exit(_syncRoot);
     }
 }
Пример #19
0
 protected internal AdminController(IUserService userService, IProfileService profileService, ISettingsManager settingsManager, ICategoryService categoryService, IForumService forumService, ISearchService searchService, ISecurityLogService securityLogService, IErrorLog errorLog, IBanService banService, IModerationLogService modLogService, IIPHistoryService ipHistoryService, IImageService imageService, IMailingListService mailingListService, IEventDefinitionService eventDefinitionService, IAwardDefinitionService awardDefinitionService, IEventPublisher eventPublisher)
 {
     _userService            = userService;
     _profileService         = profileService;
     _settingsManager        = settingsManager;
     _categoryService        = categoryService;
     _forumService           = forumService;
     _searchService          = searchService;
     _securityLogService     = securityLogService;
     _errorLogService        = errorLog;
     _banService             = banService;
     _moderationLogService   = modLogService;
     _ipHistoryService       = ipHistoryService;
     _imageService           = imageService;
     _mailingListService     = mailingListService;
     _eventDefinitionService = eventDefinitionService;
     _awardDefinitionService = awardDefinitionService;
     _eventPublisher         = eventPublisher;
 }
Пример #20
0
 public void ProcessCalculation(IAwardCalculator calculator, IErrorLog errorLog)
 {
     if (!Monitor.TryEnter(_syncRoot))
     {
         return;
     }
     try
     {
         calculator.ProcessOneCalculation();
     }
     catch (Exception exc)
     {
         errorLog.Log(exc, ErrorSeverity.Error);
     }
     finally
     {
         Monitor.Exit(_syncRoot);
     }
 }
Пример #21
0
 public CacheHelper(IErrorLog errorLog)
 {
     _errorLog = errorLog;
     _config   = new Config();
     if (_cacheConnection == null)
     {
         _cacheConnection = ConnectionMultiplexer.Connect(_config.CacheConnectionString);
         _cacheConnection.PreserveAsyncOrder = false;
     }
     if (_cache == null)
     {
         SetupLocalCache();
     }
     if (_messageConnection == null)
     {
         _messageConnection = ConnectionMultiplexer.Connect(_config.CacheConnectionString);
         _cacheConnection.PreserveAsyncOrder = false;
         var db = _messageConnection.GetSubscriber();
         db.Subscribe(_removeChannel, (channel, value) =>
         {
             if (_cache == null)
             {
                 return;
             }
             _cache.Remove(value.ToString());
         });
         db.Subscribe(_addChannel, (channel, value) =>
         {
             if (_cache == null)
             {
                 SetupLocalCache();
             }
             var keyValue = JsonConvert.DeserializeObject <LocalCacheKeyValue>(value);
             var options  = new MemoryCacheEntryOptions {
                 SlidingExpiration = TimeSpan.FromMinutes(60)
             };
             var valueType = Type.GetType(keyValue.FullType);
             var castValue = JsonConvert.DeserializeObject(keyValue.Value.ToString(), valueType);
             _cache.Set(keyValue.Key, castValue, options);
         });
     }
 }
Пример #22
0
        public TransactionHeadCollection(
            IStartupLog startupLog,
            IErrorLog errorLog,
            IPagePool pagePool)
        {
            _transactions = new Dictionary <ulong, TransactionHead>();
            _startupLog   = startupLog;
            _errorLog     = errorLog;
            _pagePool     = pagePool;

            _cleanupThread = new Thread(() =>
            {
                _startupLog.WriteLine("Transaction clean up thread starting");

                while (!_disposing)
                {
                    try
                    {
                        Thread.Sleep(50);

                        // TODO: Kill long running and deadlocked transactions
                    }
                    catch (ThreadAbortException)
                    {
                        return;
                    }
                    catch (Exception ex)
                    {
                        _errorLog.WriteLine("Exception in page cache stale page cleanup thread. " + ex.Message, ex);
                    }
                }

                _startupLog.WriteLine("Transaction clean up thread exiting");
            })
            {
                IsBackground = true,
                Name         = "Transaction collection cleanup",
                Priority     = ThreadPriority.AboveNormal
            };

            _cleanupThread.Start();
        }
 public SupplierReturnRepository(ISupplierProfileRepository supplierProfileContext, IItemRepository iItemRepository,
                                 IDataRepository <CompanyConfiguration> companyConfigurationContext, IDataRepository <BranchDetail> branchDetailContext,
                                 IDataRepository <ItemProfile> itemProfileContext, ISupReturnWorkListRepository ISupReturnWorkListRepository,
                                 IDataRepository <SupplierReturnItem> supplierReturnItemContext, IWorkFlowDetailsRepository IWorkFlowDetailsRepository,
                                 IDataRepository <SupplierReturnDetail> supplierReturnDetailContext, ISystemParameterRepository systemParameterContext,
                                 IDataRepository <ItemSupplier> itemSupplierContext, IErrorLog errorLog)
 {
     _supplierReturnDetailContext  = supplierReturnDetailContext;
     _supplierReturnItemContext    = supplierReturnItemContext;
     _itemProfileContext           = itemProfileContext;
     _ISupReturnWorkListRepository = ISupReturnWorkListRepository;
     _systemParameterContext       = systemParameterContext;
     _supplierProfileContext       = supplierProfileContext;
     _IWorkFlowDetailsRepository   = IWorkFlowDetailsRepository;
     _companyConfigurationContext  = companyConfigurationContext;
     _iItemRepository     = iItemRepository;
     _branchDetailContext = branchDetailContext;
     _itemSupplierContext = itemSupplierContext;
     _errorLog            = errorLog;
 }
Пример #24
0
 // forward events raised by children
 private void ChildErrorLogItemAdded(object sender, ErrorLogItemAddedArgs e)
 {
     // If the sender is an ErrorLog and AutoMergeChildLog, consume its entries
     if (AutoMergeChildLog)
     {
         IErrorLog child = sender as IErrorLog;
         if (child != null)
         {
             lock ( mResourceLock )
             {
                 mList.AddRange(child.ErrorList);
                 child.Clear();
             }
         }
     }
     if (ErrorLogItemAdded != null)
     {
         ErrorLogItemAdded(this, e);
     }
 }
Пример #25
0
        public PageCache(
            IFileSet fileSet,
            IDatabase database,
            IPagePoolFactory pagePoolFactory,
            IStartupLog startupLog,
            IErrorLog errorLog)
        {
            _startupLog = startupLog;
            _errorLog   = errorLog;
            _fileSet    = fileSet;
            _database   = database;

            startupLog.WriteLine("Creating a new page cache for " + _fileSet);

            _pagePool = pagePoolFactory.Create(fileSet.PageSize);

            _pages        = new PageHeadCollection(fileSet, startupLog, errorLog, _pagePool);
            _versions     = new VersionHeadCollection(startupLog, errorLog, database);
            _transactions = new TransactionHeadCollection(startupLog, errorLog, _pagePool);
        }
Пример #26
0
		public void SendQueuedMessages(ISettingsManager settingsManager, ISmtpWrapper smtpWrapper, IQueuedEmailMessageRepository queuedEmailRepository, IErrorLog errorLog)
		{
			if (!Monitor.TryEnter(_syncRoot))
			{
				return;
			}
			try
			{
				var messageGroup = new List<QueuedEmailMessage>();
				for (var i = 1; i <= settingsManager.Current.MailerQuantity; i++)
				{
					var queuedMessage = queuedEmailRepository.GetOldestQueuedEmailMessage();
					if (queuedMessage == null)
						break;
					messageGroup.Add(queuedMessage);
					queuedEmailRepository.DeleteMessage(queuedMessage.MessageID);
				}
				Parallel.ForEach(messageGroup, message =>
				{
					try
					{
						smtpWrapper.Send(message);
					}
					catch (Exception exc)
					{
						if (message == null)
							errorLog.Log(exc, ErrorSeverity.Email, "There was no message for the MailWorker to send.");
						else
							errorLog.Log(exc, ErrorSeverity.Email, String.Format("MessageID: {0}, To: <{1}> {2}, Subject: {3}", message.MessageID, message.ToEmail, message.ToName, message.Subject));
					}
				});
			}
			catch (Exception exc)
			{
				errorLog.Log(exc, ErrorSeverity.Error);
			}
			finally
			{
				Monitor.Exit(_syncRoot);
			}
		}
        public CacheHelper(IErrorLog errorLog)
        {
            _errorLog = errorLog;
            _config   = new Config();
            if (connection == null)
            {
                var connectionString = ConfigurationManager.ConnectionStrings[_config.CacheConnectionStringName].ConnectionString;
                if (String.IsNullOrWhiteSpace(connectionString))
                {
                    throw new Exception(String.Format("Can't find a connnection string named '{0}' for the CacheConnectionStringName.", _config.CacheConnectionStringName));
                }
                connection = ConnectionMultiplexer.Connect(connectionString);
            }
            _cache = connection.GetDatabase();
            var contractResolver = new IgnorePropertyContractResolver();

            contractResolver.Ignore(typeof(User), "Identity");
            _jsonSerializerSettings = new JsonSerializerSettings {
                ReferenceLoopHandling = ReferenceLoopHandling.Ignore, MissingMemberHandling = MissingMemberHandling.Ignore, ContractResolver = contractResolver
            };
        }
Пример #28
0
        public static ErrorData ToModel(this IErrorLog log, bool withDetails = false)
        {
            if (log == null)
            {
                return(null);
            }
            var data = new ErrorData()
            {
                AppName       = log.AppName, LocalTime = log.LocalTime, MachineName = log.MachineName,
                ExceptionType = log.ExceptionType, Message = log.Message,
                IsClientError = log.IsClientError
                                // Details = log.Details, Message = log.Message, OperationLog = log.OperationLog
            };

            data.AssignCommon(log);
            if (withDetails)
            {
                data.Details = log.Details; data.OperationLog = log.OperationLog;
            }
            return(data);
        }
 public AdminApiController(ISettingsManager settingsManager, ICategoryService categoryService, IForumService forumService, IUserService userService, ISearchService searchService, IProfileService profileService, IUserRetrievalShim userRetrievalShim, IImageService imageService, IBanService banService, IMailingListService mailingListService, IEventDefinitionService eventDefinitionService, IAwardDefinitionService awardDefinitionService, IEventPublisher eventPublisher, IIPHistoryService ipHistoryService, ISecurityLogService securityLogService, IModerationLogService moderationLogService, IErrorLog errorLog, IServiceHeartbeatService serviceHeartbeatService)
 {
     _settingsManager        = settingsManager;
     _categoryService        = categoryService;
     _forumService           = forumService;
     _userService            = userService;
     _searchService          = searchService;
     _profileService         = profileService;
     _userRetrievalShim      = userRetrievalShim;
     _imageService           = imageService;
     _banService             = banService;
     _mailingListService     = mailingListService;
     _eventDefinitionService = eventDefinitionService;
     _awardDefinitionService = awardDefinitionService;
     _eventPublisher         = eventPublisher;
     _ipHistoryService       = ipHistoryService;
     _securityLogService     = securityLogService;
     _moderationLogService   = moderationLogService;
     _errorLog = errorLog;
     _serviceHeartbeatService = serviceHeartbeatService;
 }
Пример #30
0
 public CacheHelper(IErrorLog errorLog, ITenantService tenantService, IConfig config, ICacheTelemetry cacheTelemetry)
 {
     _errorLog       = errorLog;
     _tenantService  = tenantService;
     _config         = config;
     _cacheTelemetry = cacheTelemetry;
     // Redis cache
     if (_cacheConnection == null)
     {
         lock (SyncRoot)
         {
             if (_cacheConnection == null)
             {
                 _cacheConnection = ConnectionMultiplexer.Connect(_config.CacheConnectionString);
             }
         }
     }
     // Local cache
     if (_cache == null)
     {
         SetupLocalCache();
     }
     // Redis messaging to invalidate local cache entries
     if (_messageConnection == null)
     {
         lock (SyncRoot)
         {
             _messageConnection = ConnectionMultiplexer.Connect(_config.CacheConnectionString);
             var db = _messageConnection.GetSubscriber();
             db.Subscribe(RemoveChannel, (channel, value) =>
             {
                 if (_cache == null)
                 {
                     return;
                 }
                 _cache.Remove(value.ToString());
             });
         }
     }
 }
 public CustomerPORepository(IDataRepository <ItemProfile> itemProfileContext, IDataRepository <CustomerProfile> customerProfileContext,
                             IDataRepository <ParamType> paramTypeContext, IDataRepository <UserDetail> userDetailContext, IDataRepository <CPOItem> CPOItemContext,
                             IDataRepository <CustomerPurchaseOrder> customerPOContext, IAccountingRepository iAccountingRepository, IErrorLog errorLog,
                             IDataRepository <CPOAdditionalCost> CPOAdditionalCostContext, IDataRepository <CompanyConfiguration> companyConfigurationContext,
                             IDataRepository <CPODownPayment> cpoDownPaymentContext, IDataRepository <CPOPayment> cpoPaymentContext,
                             IDataRepository <CPOPaymentType> cpoPaymentTypeContext, IDataRepository <CPOBill> cpoBillContext)
 {
     _customerProfileContext      = customerProfileContext;
     _customerPOContext           = customerPOContext;
     _CPOAdditionalCostContext    = CPOAdditionalCostContext;
     _userDetailContext           = userDetailContext;
     _CPOItemContext              = CPOItemContext;
     _paramTypeContext            = paramTypeContext;
     _companyConfigurationContext = companyConfigurationContext;
     _cpoPaymentContext           = cpoPaymentContext;
     _cpoDownPaymentContext       = cpoDownPaymentContext;
     _cpoPaymentTypeContext       = cpoPaymentTypeContext;
     _itemProfileContext          = itemProfileContext;
     _cpoBillContext              = cpoBillContext;
     _iAccountingRepository       = iAccountingRepository;
     _errorLog = errorLog;
 }
Пример #32
0
 public SupplierPORepository(IWorkFlowDetailsRepository IWorkFlowDetailsRepository,
                             ISupplierPOWorkListRepository supplierPOWorkListContext,
                             IDataRepository <PurchaseOrderBranch> purchaseOrderBranchContext, IDataRepository <CompanyConfiguration> companyConfigurationContext,
                             IDataRepository <WorkFlowDetail> workFlowContext, IDataRepository <WorkFlowLog> workFlowLogContext, IErrorLog errorLog,
                             IDataRepository <ItemProfile> itemProfileContext, IDataRepository <ItemSupplier> itemSupplierContext, IDataRepository <ParamType> paramTypeContext,
                             IDataRepository <UserDetail> userDetailContext, IDataRepository <SupplierPurchaseOrder> supplierPOContext,
                             IDataRepository <PurchaseOrderItem> purchaseOrderItemContext)
 {
     _companyConfigurationContext = companyConfigurationContext;
     _paramTypeContext            = paramTypeContext;
     _userDetailContext           = userDetailContext;
     _itemProfileContext          = itemProfileContext;
     _itemSupplierContext         = itemSupplierContext;
     _supplierPOContext           = supplierPOContext;
     _workFlowContext             = workFlowContext;
     _IWorkFlowDetailsRepository  = IWorkFlowDetailsRepository;
     _supplierPOWorkListContext   = supplierPOWorkListContext;
     _purchaseOrderItemContext    = purchaseOrderItemContext;
     _purchaseOrderBranchContext  = purchaseOrderBranchContext;
     _workFlowLogContext          = workFlowLogContext;
     _errorLog = errorLog;
 }
Пример #33
0
 public void IndexNextTopic(IErrorLog errorLog, ISearchIndexSubsystem searchIndexSubsystem, ISearchService searchService, ITenantService tenantService)
 {
     if (!Monitor.TryEnter(_syncRoot, 5000))
     {
         return;
     }
     try
     {
         var payload = searchService.GetNextTopicForIndexing().Result;
         if (payload == null)
         {
             return;
         }
         searchIndexSubsystem.DoIndex(payload.TopicID, payload.TenantID, payload.IsForRemoval);
     }
     catch (Exception exc)
     {
         errorLog.Log(exc, ErrorSeverity.Error);
     }
     finally
     {
         Monitor.Exit(_syncRoot);
     }
 }
Пример #34
0
 public CustomerPOWorkListRepository(IDataRepository <CustomerPurchaseOrder> customerPOContext, IDataRepository <CPOItem> CPOItemContext,
                                     IDataRepository <POSBillItem> posBillItemContext, IDataRepository <CPOAdditionalCost> CPOAdditionalCostContext,
                                     IDataRepository <CPOPayment> cpoPaymentContext, IDataRepository <CPOBill> cpoBillContext, IErrorLog errorLog)
 {
     _customerPOContext        = customerPOContext;
     _posBillItemContext       = posBillItemContext;
     _CPOAdditionalCostContext = CPOAdditionalCostContext;
     _CPOItemContext           = CPOItemContext;
     _cpoPaymentContext        = cpoPaymentContext;
     _cpoBillContext           = cpoBillContext;
     _errorLog = errorLog;
 }
Пример #35
0
 public LoginController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, ICompanyRepository companyContext, IDataRepository <UserDetail> userDataRepository, IUserDetailRepository userDetailRepository, IErrorLog errorLog, IBranchRepository branchRepository, IDataRepository <Role> roleContext, ILogger logger)
 {
     UserManager           = userManager;
     SignInManager         = signInManager;
     _companyContext       = companyContext;
     _userDataRepository   = userDataRepository;
     _userDetailRepository = userDetailRepository;
     _errorLog             = errorLog;
     _branchRepository     = branchRepository;
     _logger = logger;
 }
Пример #36
0
 public SupplierProfileRepository(IDataRepository <SupplierProfile> supplierProfileContext, IDataRepository <SupplierContactPerson> supplierContactPersonContext,
                                  IDataRepository <SupplierDaysLimit> supplierDaysLimitContext, IDataRepository <SupplierPurchaseOrder> supplierPOContext,
                                  IDataRepository <ItemSupplier> itemSupplierContext, IDataRepository <ParamType> paramTypeContext, IErrorLog errorLog)
 {
     _supplierProfileContext       = supplierProfileContext;
     _supplierContactPersonContext = supplierContactPersonContext;
     _supplierDaysLimitContext     = supplierDaysLimitContext;
     _paramTypeContext             = paramTypeContext;
     _itemSupplierContext          = itemSupplierContext;
     _supplierPOContext            = supplierPOContext;
     _errorLog = errorLog;
 }
Пример #37
0
		public MailingListService(IUserService userService, IMailingListComposer mailingListComposer, IErrorLog errorLog)
		{
			_userService = userService;
			_mailingListComposer = mailingListComposer;
			_errorLog = errorLog;
		}
Пример #38
0
 /// <summary>
 /// initialize variables that are initialized from classes specific to the server, eg. with access to OpenPetra database
 /// </summary>
 public static void InitializeStaticVariables(ISystemDefaultsCache ASystemDefaultsCache,
     IUserManager AUserManager,
     IErrorLog AErrorLog,
     IMaintenanceLogonMessage AMaintenanceLogonMessage)
 {
     USystemDefaultsCache = ASystemDefaultsCache;
     UUserManager = AUserManager;
     UErrorLog = AErrorLog;
     UMaintenanceLogonMessage = AMaintenanceLogonMessage;
 }
 public AwardCalculator(IAwardCalculationQueueRepository awardCalcRepository, IEventDefinitionService eventDefinitionService, IUserRepository userRepository, IErrorLog errorLog, IAwardDefinitionService awardDefinitionService, IUserAwardService userAwardService, IPointLedgerRepository pointLedgerRepository)
 {
     _awardCalcRepository    = awardCalcRepository;
     _eventDefinitionService = eventDefinitionService;
     _userRepository         = userRepository;
     _errorLog = errorLog;
     _awardDefinitionService = awardDefinitionService;
     _userAwardService       = userAwardService;
     _pointLedgerRepository  = pointLedgerRepository;
 }
Пример #40
0
 public static void Clean()
 {
     m_AsyncEvent = null;
     m_ErrorInfo = null;
     m_ExtWndsSupport = null;
     m_PropertyProfile = null;
     m_StatusLine = null;
     m_V7Object = null;
 }
Пример #41
0
		public SmtpWrapper(ISettingsManager settingsManager, IErrorLog errorLog)
		{
			_settingsManager = settingsManager;
			_errorLog = errorLog;
		}
Пример #42
0
 public ErrorLogViewMiddleware(OwinMiddleware next, ElmoViewerOptions options, IErrorLog errorLog)
     : base(next, options, errorLog) { }
Пример #43
0
 public ElmoMiddleware(OwinMiddleware next, IAppBuilder app, IErrorLog errorLog)
     : base(next)
 {
     this.errorLog = errorLog;
     logger = app.CreateLogger<ElmoMiddleware>();
 }
Пример #44
0
 public void IndexNextTopic(ISearchService searchService, ISettingsManager settingsManager, IPostService postService, IErrorLog errorLog)
 {
     if (!Monitor.TryEnter(_syncRoot))
     {
         return;
     }
     try
     {
         DoIndex(searchService, settingsManager, postService);
     }
     catch (Exception exc)
     {
         errorLog.Log(exc, ErrorSeverity.Error);
     }
     finally
     {
         Monitor.Exit(_syncRoot);
     }
 }
Пример #45
0
			public TestableAdminController(IUserService userService, IProfileService profileService, ISettingsManager settingsManager, ICategoryService categoryService, IForumService forumService, ISearchService searchService, ISecurityLogService securityLogService, IErrorLog errorLog, IBanService banService, IModerationLogService modLogService, IIPHistoryService ipHistoryService, IImageService imageService, IMailingListService mailingListService, IEventDefinitionService eventDefinitonService, IAwardDefinitionService awardDefinitionService, IEventPublisher eventPublisher) : base(userService, profileService, settingsManager, categoryService, forumService, searchService, securityLogService, errorLog, banService, modLogService, ipHistoryService, imageService, mailingListService, eventDefinitonService, awardDefinitionService, eventPublisher) { }
Пример #46
0
		public SettingsManager(ISettingsRepository settingsRepository, IErrorLog errorLog)
		{
			_settingsRepository = settingsRepository;
			_errorLog = errorLog;
		}
 public SmtpWrapper(ISettingsManager settingsManager, IErrorLog errorLog)
 {
     _settingsManager = settingsManager;
     _errorLog        = errorLog;
 }
Пример #48
0
 protected ErrorViewBaseMiddleware(OwinMiddleware next, ElmoViewerOptions options, IErrorLog errorLog) : base(next)
 {
     Options = options;
     ErrorLog = errorLog;
 }
Пример #49
0
 public ErrorDigestRssMiddleware(OwinMiddleware next, ElmoViewerOptions options, IErrorLog errorLog) : base(next)
 {
     this.options = options;
     this.errorLog = errorLog;
 }
Пример #50
0
 /// <summary>
 /// initialize variables that are initialized from classes specific to the server, eg. with access to OpenPetra database
 /// </summary>
 public static void InitializeStaticVariables(ISystemDefaultsCache ASystemDefaultsCache,
     ICacheableTablesManager ACacheableTablesManager,
     IUserManager AUserManager,
     IErrorLog AErrorLog,
     IMaintenanceLogonMessage AMaintenanceLogonMessage,
     IClientAppDomainConnection AClientDomainManager)
 {
     USystemDefaultsCache = ASystemDefaultsCache;
     UCacheableTablesManager = ACacheableTablesManager;
     UUserManager = AUserManager;
     UErrorLog = AErrorLog;
     UMaintenanceLogonMessage = AMaintenanceLogonMessage;
     UClientDomainManager = AClientDomainManager;
 }