private void BootstrapGlobalAsax() { _configurationRepository = ( IConfigurationProvider )DependencyResolver.Current.GetService(typeof(IConfigurationProvider)); _cookieProvider = ( ICookieProvider )DependencyResolver.Current.GetService(typeof(ICookieProvider)); _helper = ( IGlobalAsaxHelpers )DependencyResolver.Current.GetService(typeof(IGlobalAsaxHelpers)); if (_configurationRepository == null) { throw new ArgumentNullException(nameof(IConfigurationProvider)); } if (_cookieProvider == null) { throw new ArgumentNullException(nameof(ICookieProvider)); } if (_helper == null) { throw new ArgumentNullException(nameof(IGlobalAsaxHelpers)); } _applicationConfiguration = ( IApplicationConfiguration )DependencyResolver.Current.GetService(typeof(IApplicationConfiguration)); // store the application configuration object in session cache (for the application scope) ... _sessionCacheProvider.SaveForApplication(_applicationConfiguration, "ApplicationConfiguration"); _loggingFactory = ( ISerilogLoggingFactory )DependencyResolver.Current.GetService(typeof(ISerilogLoggingFactory)); var loggingContext = new LoggingContextProvider(); _logger = new SerilogErrorLogProvider(_loggingFactory, loggingContext); }
public void Init(EntityApp app) { _errorLog = app.GetService <IErrorLogService>(); _timeService = TimeService.Instance; _timer = new Timer(Timer_Elapsed, null, 100, 100); app.AppEvents.Initializing += Events_Initializing; }
public DsrController(ILocationService locationService, IErrorLogService _errorLogService, IDsrService DsrService, IKycService kycService) { this._DsrService = DsrService; this._kycService = kycService; this.errorLogService = _errorLogService; this._locationService = locationService; }
public EmailService(IDataProvider dataProvider, IConfigService configService, IErrorLogService errorLogService, IFacebookService facebookService, ITwitterService twitterService) : base(dataProvider) { _configService = configService; _errorLogService = errorLogService; _facebookService = facebookService; _twitterService = twitterService; }
public CommissionConversionController(ICommissionConversionService CommissionConversionService, IAuditTrailService objAuditTrailService, IErrorLogService objerrorLogService) { this._CommissionConversionService = CommissionConversionService; this._auditTrailService = objAuditTrailService; this.errorLogService = objerrorLogService; }
public ExceptionMiddleware(RequestDelegate next, IErrorLogService service, IHostingEnvironment hostingEnvironment, IUserService userService) { _next = next; _service = service; _userService = userService; _hostingEnvironment = hostingEnvironment; }
public UserService(IBaseService baseService, IErrorLogService errorLogService, IEmailConfirmationService emailConfirmationService, IAdminService adminService) { _baseService = baseService; _baseService.ErrorLog = errorLogService; _emailConfirmationService = emailConfirmationService; _adminService = adminService; }
public ViewResult HandleException(ExceptionContext filterContext, IErrorLogService errorLogService = null) { filterContext.ExceptionHandled = true; var exception = filterContext.Exception; if (_errorLogService == null) { _errorLogService = (RollingFileErrorLogProvider)DependencyResolver.Current.GetService(typeof(IErrorLogService)); } if (errorLogService == null) { errorLogService = _errorLogService; } errorLogService.LogFatal(this, exception.Message, exception); var viewResult = View("Error", new HandleErrorInfo(exception, filterContext.RouteData.Values["controller"].ToString(), filterContext.RouteData.Values["action"].ToString())); return(viewResult); }
public void DisplayErrorLog(IErrorLogService errorLogService) { errorLogService.ForEachConfigurationErrors(new Action <ConfigurationError>(DisplayConfigurationError)); configurationErrorsCount = errorLogService.ConfigurationErrorCount; errorLogService.ForEachValidationErrors(new Action <ValidationError>(DisplayValidationError)); validationErrorsCount = errorLogService.ValidationErrorCount; }
public BillCollectionCommonController(IBillCollectionCommonService BillCollectionCommonService, IAuditTrailService objAuditTrailService, IErrorLogService objerrorLogService) { this._BillCollectionCommonService = BillCollectionCommonService; this._auditTrailService = objAuditTrailService; this.errorLogService = objerrorLogService; }
public DistributorDepositController(IDistributorDepositService distributorDepositService, IAuditTrailService objAuditTrailService, IErrorLogService objerrorLogService) { this._distributorDepositService = distributorDepositService; this._auditTrailService = objAuditTrailService; this.errorLogService = objerrorLogService; }
public ProductCategoryController( IErrorLogService errorLogService, IProductCategoryService productCategoryService) : base(errorLogService) { this.productCategoryService = productCategoryService; }
public EventDetailsController(IEventDetailsPageService eventDetailsPageService, IErrorLogService errorLogService, IEventListingService eventListingService, IAuthenticationService authenticationService) { _eventDetailsPageService = eventDetailsPageService; _eventListingService = eventListingService; _errorLogService = errorLogService; _authenticationService = authenticationService; }
public MerchantController(IErrorLogService _errorLogService, IMerchantService MerchantService, IKycService kycService, IMerchantUserService merchantUserService) { this._MerchantService = MerchantService; this._kycService = kycService; this._MerchantUserService = merchantUserService; this.errorLogService = _errorLogService; }
public void DisplayErrorLog(IErrorLogService errorLogService) { errorLogService.ForEachConfigurationErrors(new Action<ConfigurationError>(DisplayConfigurationError)); configurationErrorsCount = errorLogService.ConfigurationErrorCount; errorLogService.ForEachValidationErrors(new Action<ValidationError>(DisplayValidationError)); validationErrorsCount = errorLogService.ValidationErrorCount; }
public CustomerRequestController(IKycService _kycService, IErrorLogService _errorLogService, IAuditTrailService _auditTrailService, ICustomerReqLogService _customerReqLogService, ICustomerRequestService _customerRequestService) { auditTrailService = _auditTrailService; customerReqLogService = _customerReqLogService; customerRequestService = _customerRequestService; errorLogService = _errorLogService; kycService = _kycService; }
public WebCallContextHandler(EntityApp app, WebCallContextHandlerSettings settings) { App = app; Settings = settings ?? new WebCallContextHandlerSettings(); App.RegisterConfig(Settings); _webCallLog = App.GetService<IWebCallLogService>(); _errorLog = App.GetService<IErrorLogService>(); App.RegisterService<IWebCallNotificationService>(this); }
public OrderService(IRepository <Order> orderRepository, IRepository <OrderItem> orderItemRepository, IErrorLogService errorLogService, IRepository <Product> productRepository) { _orderRepository = orderRepository; _orderItemRepository = orderItemRepository; _errorLogService = errorLogService; _productRepository = productRepository; }
public TransactionMasterController(IKycService _kycService, ITransactionMasterService _transMastService, IErrorLogService objerrorLogService, IAuditTrailService objAuditTrailService) { this.transMastService = _transMastService; this.errorLogService = objerrorLogService; _auditTrailService = objAuditTrailService; this.kycService = _kycService; }
public AuthApiController(IUserService userService, IAuthenticationService auth, IPrincipal principal, IEmailService emailService, IErrorLogService errorLogService) { _userService = userService; _auth = auth; _principal = principal; _emailService = emailService; _errorLogService = errorLogService; }
public JobsController() { IUnitOfWork _unitOfWork = new UnitOfWork(); _jobsService = new JobsService(_unitOfWork); _accountService = new AccountService(_unitOfWork); _errorLogService = new ErrorLogService(_unitOfWork); }
public ImportAdlerFacade(ICategoryService categoryService, IItemCardService itemCardService, IErrorLogService errorLogService) { _categoryService = categoryService; _itemCardService = itemCardService; _errorLogService = errorLogService; }
public DisbursementUserController(IMerchantUserService _merchantUserService, IErrorLogService _errorLogService, IDisbursementUserService _usersService, IAuditTrailService objAuditTrailService) { disbursementUserService = _usersService; errorLogService = _errorLogService; merchantUsersService = _merchantUserService; _auditTrailService = objAuditTrailService; }
public RoleService(ATContext db, IErrorLogService error, RoleManager <ATRole> roleManager) { _db = db; _error = error; // _signInManager = signInManager; // _userManager = userManager; _roleManager = roleManager; }
public void Init(EntityApp app) { _app = app; _errorLog = _app.GetService<IErrorLogService>(); _operationLog = _app.GetService<IOperationLogService>(); _timerService = _app.GetService<ITimerService>(); _timerService.Elapsed1Second += TimerService_Elapsed1Second; _app.AppEvents.FlushRequested += Events_FlushRequested; }
public ApplicationUserController(IMerchantUserService _merchantUserService, IErrorLogService _errorLogService, IApplicationUserService _usersService, IAuditTrailService objAuditTrailService, IEmailService _emailService) { usersService = _usersService; errorLogService = _errorLogService; merchantUsersService = _merchantUserService; _auditTrailService = objAuditTrailService; emailService = _emailService; }
////////////////////////////////// public UserBaseController(IUserBaseService userBaseService, IUserService userService, ISendgridService sendgridService, IErrorLogService errorLogService, IGmailService gmailService, IEmailTemplate emailTemplate) { _userBaseService = userBaseService; _userService = userService; _sendgridService = sendgridService; _gmailService = gmailService; _errorLogService = errorLogService; _emailTemplate = emailTemplate; }
public void Init(EntityApp app) { _app = app; _errorLog = _app.GetService <IErrorLogService>(); _operationLog = _app.GetService <IOperationLogService>(); _timerService = _app.GetService <ITimerService>(); _timerService.Elapsed1Second += TimerService_Elapsed1Second; _app.AppEvents.FlushRequested += Events_FlushRequested; }
public SecurityController(IMerchantUserService _merchantUserService, IErrorLogService _errorLogService, IApplicationUserService _usersService, JwtModel _jwtModel, IDisbursementUserService objDisbursementUserService) { usersService = _usersService; jwtModel = _jwtModel; errorLogService = _errorLogService; merchantUserService = _merchantUserService; _DisbursementUserService = objDisbursementUserService; }
public AgentController(IAgentService service, IDsrService dsrService, IKycService kycService , IErrorLogService _errorLogService, IAuditTrailService objAuditTrailService) { this._service = service; this._dsrService = dsrService; this._kycService = kycService; this.errorLogService = _errorLogService; _auditTrailService = objAuditTrailService; }
public override void Save(IServiceProvider serviceProvider) { IErrorLogService errorService = ServiceHelper.GetErrorService(serviceProvider); IEnvironmentMergeService environmentMergeService = serviceProvider.GetService(typeof(IEnvironmentMergeService)) as IEnvironmentMergeService; if (environmentMergeService != null) { if (environmentMergeService.EnvironmentMergeInProgress) { return; } } IConfigurationUIHierarchy hierarchy = ServiceHelper.GetCurrentHierarchy(serviceProvider); Debug.Assert(hierarchy != null); ConfigurationApplicationNode configurationRootNode = hierarchy.FindNodeByType(typeof(ConfigurationApplicationNode)) as ConfigurationApplicationNode; Debug.Assert(configurationRootNode != null); string configurationFileDirectory = Path.GetDirectoryName(configurationRootNode.ConfigurationFile); foreach (EnvironmentNode environmentNode in hierarchy.FindNodesByType(typeof(EnvironmentNode))) { string environmentDeltaFilePath = Path.Combine(configurationFileDirectory, environmentNode.EnvironmentDeltaFile); Dictionary <string, ConfigurationNodeMergeData> mergeDataByPath = environmentNode.EnvironmentMergeData.UnfoldMergeData(hierarchy, false); EnvironmentMergeSection environmentMergeSection = new EnvironmentMergeSection(); environmentMergeSection.EnvironmentName = environmentNode.Name; environmentMergeSection.EnvironmentDeltaFile = environmentNode.EnvironmentConfigurationFile; CopyEnvironmentOverrides(environmentMergeSection, mergeDataByPath, hierarchy); string protectionProvider = GetProtectionProviderName(environmentNode); try { FileConfigurationSource fileConfigurationSource = new FileConfigurationSource(environmentDeltaFilePath, false); if (!string.IsNullOrEmpty(protectionProvider)) { fileConfigurationSource.Save(EnvironmentMergeSection.EnvironmentMergeData, environmentMergeSection, protectionProvider); } else { fileConfigurationSource.Add(EnvironmentMergeSection.EnvironmentMergeData, environmentMergeSection); } } catch (ConfigurationErrorsException configurationErrors) { errorService.LogErrors(configurationErrors); } } }
public DisbursementController(IDisbursementService disbursementService, IDisburseAmtDtlMakeService objDisburseAmtDtlMakeService, IDistributorDepositService objDistributorDepositService, IErrorLogService _errorLogService, IAuditTrailService objAuditTrailService) { this._disbursementService = disbursementService; this._disburseAmtDtlMakeService = objDisburseAmtDtlMakeService; this._distributorDepositService = objDistributorDepositService; this.errorLogService = _errorLogService; this._auditTrailService = objAuditTrailService; }
public OrderFacade(IUnitOfWork unitOfWork, IOrderEmailService orderEmailService, IErrorLogService errorLogService, IOrderItemService orderItemService) { _unitOfWork = unitOfWork; _orderEmailService = orderEmailService; _errorLogService = errorLogService; _orderItemService = orderItemService; }
public EntityCache(EntityApp app, CacheSettings settings, Database database) { _app = app; Settings = settings; _dataStore = database; _sparseCache = new SparseEntityCache(Settings); var dbIsCaseInsensitive = database.Settings.Driver.Features.IsSet(Data.Driver.DbFeatures.DefaultCaseInsensitive); var caseMode = dbIsCaseInsensitive ? StringCaseMode.CaseInsensitive : StringCaseMode.CaseSensitive; _fullSetCache = new FullSetEntityCache(_app, Settings, _dataStore, caseMode); _timeService = _app.GetService<ITimeService>(); _logService = _app.GetService<IOperationLogService>(); _errorLog = _app.GetService<IErrorLogService>(); MarkCachedEntities(); _app.AppEvents.SavedChanges += Events_SavedChanges; }
protected override void Initialize(System.Web.Http.Controllers.HttpControllerContext controllerContext) { //Note: when exception is thrown here, it is not routed to exc filter, everything just crashes, // so be careful not to throw anything in controller.Initialize base.Initialize(controllerContext); try { WebContext = WebHelper.GetWebCallContext(this); if(WebContext == null) return; OpContext = WebContext.OperationContext; ErrorLog = OpContext.App.GetService<IErrorLogService>(); } catch(Exception ex) { System.Diagnostics.Trace.WriteLine("Exception in controller.Initialize: " + ex.ToLogString()); if(ErrorLog != null) ErrorLog.LogError(ex, OpContext); } }
public ErrorLogController(IErrorLogService ObjService) { this._ObjService = ObjService; }
public void DisplayErrorLog(IErrorLogService errorLogService) { ResetErrorList(); errorLogService.ForEachValidationErrors(new Action<ValidationError>(DisplayValidationError)); errorLogService.ForEachConfigurationErrors(new Action<ConfigurationError>(DisplayConfigurationError)); }
public void Init(EntityApp app) { _errorLog = app.GetService<IErrorLogService>(); }
/// <summary> /// Initialize a new instance of the <see cref="NodeBuilder"/> class with a <see cref="IServiceProvider"/>. /// </summary> /// <param name="serviceProvider">The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</param> protected NodeBuilder(IServiceProvider serviceProvider) { this.nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider); this.errorLogService = ServiceHelper.GetErrorService(serviceProvider); this.serviceProvider = serviceProvider; }
public ErrorController(IErrorLogService errorServiceParam) { _ErrorService = errorServiceParam; }
public ErrorController(IErrorLogService errorServiceParam, IUserProfileService userProfileService) : base(userProfileService) { _ErrorService = errorServiceParam; }