public Program() { this.context = new ApplicationDbContext(); this.unitOfWork = new UnitOfWork(context); this.systemParameters = new SystemParameters(); this.logService = new SmartInspectLogService(); }
public UniqueJobList(ISystemParameters systemParameters, ILogService logService, IUnitOfWork unitOfWork) { this.systemParameters = systemParameters; this.logService = logService; this.unitOfWork = unitOfWork; this.repository = this.unitOfWork.Repository <UniqueJob>(); }
public CommonMailService(ISystemParameters systemParameters, ILogService logService) { this.systemParameters = systemParameters; this.logService = logService; this.mailProvider = new GMailProvider(systemParameters, logService); //this.mailProvider = new AliyunMailProvider(systemParameters, logService); }
public CommonSmsService(ISystemParameters systemParameters, ILogService logService, IUnitOfWork unitOfWork) { this.systemParameters = systemParameters; this.logService = logService; this.unitOfWork = unitOfWork; this.tradeService = new TradeService(unitOfWork, logService); this.uniqueJobList = new UniqueJobList(systemParameters, logService, unitOfWork); }
public EfSmsBackgroundJob(ISystemParameters systemParameters, IUnitOfWork unitOfWork, ILogService logService) { System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US"); this.systemParameters = systemParameters; this.unitOfWork = unitOfWork; this.logService = logService; this.tradeService = new TradeService(unitOfWork, logService); this.uniqueJobList = new UniqueJobList(systemParameters, logService, unitOfWork); this.sendMessageStatisticService = new SendMessageStatisticService(logService, unitOfWork); }
public Every8dSmsProvider(ISystemParameters systemParameters, ILogService logService, IUnitOfWork unitOfWork, SmsProviderType smsProviderType) { this.userName = systemParameters.Every8dUserName; this.password = systemParameters.Every8dPassword; this.systemParameters = systemParameters; this.logService = logService; this.unitOfWork = unitOfWork; this.smsProviderType = smsProviderType; this.sendMessageStatisticService = new SendMessageStatisticService(logService, unitOfWork); this.tradeService = new TradeService(unitOfWork, logService); }
public void SaveSystemParameters(ISystemParameters systemParameters) { try { System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); //configFile, ConfigurationSection section = config.RootSectionGroup.SectionGroups["applicationSettings"].Sections[ "TechnicalServices.Configuration.Global.Properties.SystemParametersSettings"]; //SettingElement systemNameElement = ((ClientSettingsSection) section).Settings.Get("SystemName"); //if (systemNameElement != null) // systemNameElement.Value.ValueXml.InnerText = systemParameters.SystemName; SettingElement reloadImageElement = ((ClientSettingsSection) section).Settings.Get("ReloadImage"); if (reloadImageElement != null) reloadImageElement.Value.ValueXml.InnerText = systemParameters.ReloadImage; SettingElement backgroundPresentationElement = ((ClientSettingsSection) section).Settings.Get("BackgroundPresentationUniqueName"); if (backgroundPresentationElement != null) backgroundPresentationElement.Value.ValueXml.InnerText = systemParameters.BackgroundPresentationUniqueName; SettingElement defaultWndsizeElement = ((ClientSettingsSection) section).Settings.Get("DefaultWndsize"); if (defaultWndsizeElement != null) defaultWndsizeElement.Value.ValueXml.InnerText = systemParameters.DefaultWndsize; SettingElement defaultBkgPresRestoreTimeout = ((ClientSettingsSection)section).Settings.Get("BackgroundScenarioRestoreTimeOut"); if (defaultBkgPresRestoreTimeout != null) defaultBkgPresRestoreTimeout.Value.ValueXml.InnerText = systemParameters.BackgroundPresentationRestoreTimeout.ToString(); section.SectionInformation.ForceSave = true; config.Save(ConfigurationSaveMode.Full); section.SectionInformation.ForceSave = false; ConfigurationManager.RefreshSection("TechnicalServices.Configuration.Global.Properties.SystemParametersSettings"); } catch (Exception ex) { throw new SystemParametersSaveException(ex.Message); } }
public InfobipSmsProvider(ISystemParameters systemParameters, ILogService logService, IUnitOfWork unitOfWork, SmsProviderType smsProviderType) { if (smsProviderType == SmsProviderType.InfobipHighQuality) { this.userName = systemParameters.InfobipHighQualityUserName; this.password = systemParameters.InfobipHighQualityPassword; } else { this.userName = systemParameters.InfobipNormalQualityUserName; this.password = systemParameters.InfobipNormalQualityPassword; } this.configuration = new Configuration(userName, password); this.smsClient = new SMSClient(configuration); this.systemParameters = systemParameters; this.logService = logService; this.unitOfWork = unitOfWork; this.smsProviderType = smsProviderType; this.sendMessageStatisticService = new SendMessageStatisticService(logService, unitOfWork); this.tradeService = new TradeService(unitOfWork, logService); }
public SendMessageRuleController(DbContext context, ILogService logService, ISystemParameters systemParameters) : base(context, logService) { this.sendMessageRuleService = new SendMessageRuleService(new UnitOfWork(context), logService); this.systemParameters = systemParameters; }
public DepartmentManagerController(ISystemParameters systemParameters, DbContext context, ILogService logService) : base(context, logService) { this.apiControllerHelper = new ApiControllerHelper(context, logService); this.tradeService = new TradeService(new UnitOfWork(context), logService); }
public void SaveSystemParameters(ISystemParameters systemParameters) { _systemParametersAdapter.SaveSystemParameters(systemParameters); }
public void SaveSystemParameters(ISystemParameters systemParameters) { using (_svc = new SimpleClient<IAdministrationService>()) { try { _svc.Open(); } catch (Exception /*ex*/) { NoConnectionException error = new NoConnectionException(); throw error; } try { _svc.Channel.SaveSystemParameters(systemParameters); } catch (FaultException Ex) { throw new SystemParametersSaveException(Ex.Message); } } }
public GMailProvider(ISystemParameters systemParameters, ILogService logService) { this.userName = systemParameters.EMailUserName; this.password = systemParameters.EMailPassword; this.logService = logService; }
public void SaveSystemParameters(ISystemParameters systemParameters) { try { _serviceConfiguration.SaveSystemParameters(systemParameters); } catch (SystemParametersSaveException ex) { SystemParametersSaveException deleteError = new SystemParametersSaveException(ex.Message); throw new FaultException<SystemParametersSaveException>(deleteError, new FaultReason(ex.Message)); } }
public GroupController(ISystemParameters systemParameters, DbContext context, ILogService logService) : base(context, logService) { this.systemParameters = systemParameters; }
public FileManagerApiController(IUnitOfWork unitOfWork, ILogService logService, ISystemParameters systemParameters) : base(unitOfWork, logService) { this.systemParameters = systemParameters; }
public void SaveSystemParameters(ISystemParameters systemParameters) { throw new NotImplementedException(); }