Exemplo n.º 1
0
 private void FormSettings_FormClosing(object sender, FormClosingEventArgs e)
 {
     using (CustomSettings settings = new CustomSettings())
     {
         settings.SaveWindowPlacement(this);
     }
 }
 public OutstandingInvoiceService(IUnitOfWorkFactory unitOfWorkFactory, IXmlHelper XmlHelper, IUrlHelper urlHelper) : base(unitOfWorkFactory)
 {
     this.unitOfWork = unitOfWorkFactory;
     customSettings  = new CustomSettings();
     this.xmlHelper  = XmlHelper;
     this.UrlHelper  = urlHelper;
 }
        protected void SendOrderCancellationEmail(IUnitOfWork unitOfWork, CustomerOrder cart)
        {
            dynamic expandoObjects = new ExpandoObject();

            this.PopulateOrderEmailModel(expandoObjects, cart, unitOfWork);
            EmailList     orCreateByName = unitOfWork.GetTypedRepository <IEmailListRepository>().GetOrCreateByName("OrderCancellation", "Order Cancellation");
            List <string> list           = BuildEmailValues(cart.Id, unitOfWork).Split(new char[] { ',' }).ToList <string>();
            EmailList     emailList      = unitOfWork.GetRepository <EmailList>().GetTable().Expand((EmailList x) => x.EmailTemplate).FirstOrDefault((EmailList x) => x.Id == orCreateByName.Id);

            if (emailList != null)
            {
                SendEmailParameter sendEmailParameter = new SendEmailParameter();
                CustomSettings     customSettings     = new CustomSettings();
                string             htmlTemplate       = GetHtmlTemplate(emailList);
                sendEmailParameter.Body = this.EmailService.Value.ParseTemplate(htmlTemplate, expandoObjects);
                string defaultEmailAddress = customSettings.DefaultEmailAddress;
                string approverEmail       = SiteContext.Current.IsUserInRole("Administrator") ? SiteContext.Current.UserProfileDto.Email : !string.IsNullOrEmpty(cart.ApproverUserProfile.Email) ? cart.ApproverUserProfile.Email : defaultEmailAddress;// BUSA-625 : To Add Reject Button to order Approve page. If Admin rejects the order, then Admin email's address should be in From address.
                sendEmailParameter.Subject            = emailList.Subject;
                sendEmailParameter.ToAddresses        = list;
                sendEmailParameter.FromAddress        = approverEmail;
                sendEmailParameter.ReplyToAddresses   = new List <string>();
                sendEmailParameter.ExtendedProperties = new NameValueCollection();
                this.EmailService.Value.SendEmail(sendEmailParameter, unitOfWork);
            }
        }
Exemplo n.º 4
0
        public CustomSettings UpdateExchanges(SettingsViewModel settings)
        {
            try
            {
                var newSettings = new CustomSettings();


                var model = _requests.GetAssets(settings.LastExchange);
                _fileManager.WriteAssetsToExcel(_directoryManager.AsstesUpdateLocation, model);
                newSettings.Btc         = model.Btc;
                newSettings.Exchange    = model.ExchangeName;
                newSettings.LowerBorder = settings.LowerBorder;
                newSettings.UpperBorder = settings.UpperBorder;
                newSettings.UpperWidth  = settings.UpperWidth;
                newSettings.LowerWidth  = settings.LowerWidth;
                var json = _fileManager.ConvertCustomSettings(newSettings);
                _directoryManager.UpdateCustomSettings(json);

                return(newSettings);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
        public override UpdateCartResult Execute(IUnitOfWork unitOfWork, UpdateCartParameter parameter, UpdateCartResult result)
        {
            if (result.GetCartResult.IsAuthenticated)
            {
                int     productCount          = 0;
                int     maxSampleQtyofProduct = 0;
                decimal?thisProductByCustomer = 0;

                CustomSettings customSettings = new CustomSettings();
                foreach (var orderLine in result.GetCartResult.Cart.OrderLines)
                {
                    var isSampleProduct = unitOfWork.GetRepository <CustomProperty>().GetTable().Where(x => x.ParentId == orderLine.ProductId && x.Name == "isSampleProduct" && x.Value.ToUpper() == "TRUE").Count();
                    if (isSampleProduct > 0)
                    {
                        string maxSampleQty = unitOfWork.GetRepository <CustomProperty>().GetTable().Where(x => x.ParentId == orderLine.ProductId && x.Name == "maxSampleQty").Select(x => x.Value).FirstOrDefault() ?? "0";
                        maxSampleQtyofProduct = Convert.ToInt32(maxSampleQty);

                        if (maxSampleQtyofProduct > 0)
                        {
                            if (orderLine.QtyOrdered > maxSampleQtyofProduct)
                            {
                                return(this.CreateErrorServiceResult <UpdateCartResult>(result, SubCode.CartServiceProductCantBeAddedToCart, string.Format(MessageProvider_Brasseler.CurrentBrasseler.ProductShipTo_LevelValidation, maxSampleQtyofProduct, orderLine.Product.ErpNumber)));
                            }
                            thisProductByCustomer = Convert.ToInt32(unitOfWork.GetRepository <SampleProductTracking>().GetTable().Where(sp => sp.CustomerId == result.GetCartResult.GetShipToResult.ShipTo.Id && (sp.ProductId == orderLine.ProductId)).Select(s => (decimal?)s.QtyOrdered).Sum() ?? 0);

                            if (Convert.ToInt32(thisProductByCustomer + orderLine.QtyOrdered) > maxSampleQtyofProduct)
                            {
                                return(this.CreateErrorServiceResult <UpdateCartResult>(result, SubCode.CartServiceProductCantBeAddedToCart, string.Format(MessageProvider_Brasseler.CurrentBrasseler.ProductShipTo_LevelValidation, maxSampleQtyofProduct, orderLine.Product.ErpNumber)));
                            }
                        }
                        productCount = productCount + Convert.ToInt32(orderLine.QtyOrdered);


                        if (productCount > customSettings.MaxSamplePerOrder)
                        {
                            return(this.CreateErrorServiceResult <UpdateCartResult>(result, SubCode.CartServiceProductCantBeAddedToCart, string.Format(MessageProvider_Brasseler.CurrentBrasseler.Sample_OrderLevelValidation, customSettings.MaxSamplePerOrder.ToString())));
                        }
                        else
                        {
                            decimal?totalSamplesByCustomer       = Decimal.Zero;
                            var     firstSampleproductByCustomer = unitOfWork.GetRepository <SampleProductTracking>().GetTable().Where(sp => sp.CustomerId == result.GetCartResult.GetShipToResult.ShipTo.Id).OrderByDescending(t => t.CreatedOn).FirstOrDefault();

                            if (firstSampleproductByCustomer != null && DateTimeOffset.Now.Date <= firstSampleproductByCustomer.TenureEnd)
                            {
                                totalSamplesByCustomer = unitOfWork.GetRepository <SampleProductTracking>().GetTable().Where(sp => sp.CustomerId == result.GetCartResult.GetShipToResult.ShipTo.Id && (sp.CreatedOn >= firstSampleproductByCustomer.TenureStart && sp.CreatedOn <= firstSampleproductByCustomer.TenureEnd)).Select(s => (decimal?)s.QtyOrdered).Sum();
                            }

                            if (totalSamplesByCustomer != null)
                            {
                                if ((productCount + Convert.ToInt32(totalSamplesByCustomer) > customSettings.MaxSampleOrderInGivenTimeFrame))
                                {
                                    return(this.CreateErrorServiceResult <UpdateCartResult>(result, SubCode.CartServiceProductCantBeAddedToCart, string.Format(MessageProvider_Brasseler.CurrentBrasseler.Sample_TenureLevelValidation, customSettings.MaxSampleOrderInGivenTimeFrame, customSettings.MaxTimeToLimitUserForSampleOrder, totalSamplesByCustomer)));
                                }
                            }
                        }
                    }
                }
            }
            return(this.NextHandler.Execute(unitOfWork, parameter, result));
        }
Exemplo n.º 6
0
        public void RegisterCustomSettings()
        {
            bool ScanningFloats = false;
            int  index          = 0;

            foreach (string key in customSettingKeys)
            {
                if (customSettingStringValues != null && customSettingStringValues.Count > index && CustomSettings.LookupStringSetting(key) == null)
                {
                    Log.Warning("Registering custom setting from " + LabelCap + " " + key + " " + customSettingStringValues[index]);
                    CustomSettings.SetStringSetting(key, customSettingStringValues[index]);
                    index++;
                    continue;
                }
                else
                {
                    index          = 0;
                    ScanningFloats = true;
                }

                if (ScanningFloats && customSettingFloatValues != null && customSettingFloatValues.Count > index && CustomSettings.LookupFloatSetting(key) <= 0)
                {
                    Log.Warning("Registering custom setting from " + LabelCap + " " + key + " " + customSettingFloatValues[index]);
                    CustomSettings.SetFloatSetting(key, customSettingFloatValues[index]);
                    index++;
                    continue;
                }
            }
        }
Exemplo n.º 7
0
 public SyndicationController(ApiHttpClient apiClient, CustomSettings settings, LoadJobsService jobsService, UrlBuilderService urlBuilder, ReferrerService referrerService)
     : base(apiClient, settings)
 {
     _referrerService = referrerService;
     _urlBuilder      = urlBuilder;
     _jobsService     = jobsService;
 }
Exemplo n.º 8
0
        public void Setup()
        {
            ICustomSettings customSettings = new CustomSettings();
            IUrlDefinitions urlDefinitions = new UrlDefinitions(customSettings);

            uut = new AddressLaundering(urlDefinitions);
        }
        protected virtual void OnEnable()
        {
            CustomSettings <TData> settings = OnGetSettings();

            Drawer = new CustomSettingsDrawer <TData>(settings);
            Drawer.Enable();
        }
Exemplo n.º 10
0
        public void SerializeandSave(string fileName, CustomSettings records)
        {
            if (records == null)
            {
                return;
            }

            var serializer = new XmlSerializer(records.GetType());

            if (Path.GetDirectoryName(fileName) == null || !Directory.Exists(Path.GetDirectoryName(fileName)))
            {
                Directory.CreateDirectory(Path.GetDirectoryName(fileName));
            }

            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }

            var stream = new StreamWriter(fileName);

            serializer.Serialize(stream, records);

            stream.Close();
            stream.Dispose();
        }
 public ProductsController(
     IProductRepo productRepo,
     IOptionsSnapshot <CustomSettings> settings)
 {
     _settings    = settings.Value;
     _productRepo = productRepo;
 }
Exemplo n.º 12
0
 public AccountController(ApiHttpClient apiClient, CustomSettings settings, LoadJobsService jobsService, UpdateApplicantService updateApplicantService, UpdateApplicantFileService updateApplicantFileService)
     : base(apiClient, settings)
 {
     _updateApplicantFileService = updateApplicantFileService;
     _updateApplicantService     = updateApplicantService;
     _jobsService = jobsService;
 }
Exemplo n.º 13
0
        private string CustomSettingsContent()
        {
            var path = Path.Combine(_env, _customSettings);

            try
            {
                if (!File.Exists(path))
                {
                    var myFile = File.Create(path);
                    myFile.Close();
                    var defaultSettings = new CustomSettings();
                    var defaultJson     = _fileManager.ConvertCustomSettings(defaultSettings);
                    File.WriteAllText(path, defaultJson);
                }
                string json;
                using (var content = new StreamReader(path))
                {
                    json = content.ReadToEnd();
                }
                return(json);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
Exemplo n.º 14
0
 private void FormSettings_Load(object sender, EventArgs e)
 {
     using (CustomSettings settings = new CustomSettings())
     {
         settings.RestoreWindowPlacement(this);
     }
 }
Exemplo n.º 15
0
        public async Task <IActionResult> SaveCustomSettings([FromBody] CustomSettings settings)
        {
            EnsureArg.IsNotNull(settings, nameof(settings));
            await settingsService.SaveCustomSettings(settings);

            return(new OkResult());
        }
Exemplo n.º 16
0
        private void DataToControls(CustomSettings config = null)
        {
            if (config != null) //only done once
            {
                foreach (DSMHost h in config.DSMHosts.Items)
                {
                    comboBox1.Items.Add(h.Host);
                }
                dataGridView1.DataSource = config.List;
            }

            if (!string.IsNullOrEmpty(Default.AutoRefreshServer))
            {
                if (_config.DSMHosts.Items.ContainsKey(Default.AutoRefreshServer))
                {
                    checkBox1.CheckState    = CheckState.Checked;
                    comboBox1.Enabled       = true;
                    comboBox1.SelectedIndex = -1;
                    comboBox1.Text          = Default.AutoRefreshServer;
                }
            }
            else
            {
                checkBox1.CheckState    = CheckState.Unchecked;
                comboBox1.Enabled       = false;
                comboBox1.SelectedIndex = -1;
            }

            if (!string.IsNullOrEmpty(Default.CacheFolder))
            {
                chkCacheFolder.CheckState = CheckState.Checked;
                txtFolder.Text            = Default.CacheFolder;
            }
            else
            {
                chkCacheFolder.CheckState = CheckState.Unchecked;
                txtFolder.Text            = Path.Combine(GetFolderPath(SpecialFolder.MyDocuments), Application.ProductName);
            }
            optAnalyzerDbKeep.Checked   = Default.KeepAnalyzerDb;
            optAnalyzerDbRemove.Checked = !Default.KeepAnalyzerDb;
            txtKeep.Text = Default.KeepAnalyzerDbCount.ToString();

            txtDPAPI.Text = Default.DPAPIVector;

            txtDiffExeArgs.Text = Default.DiffArgs;
            txtDiffTool.Text    = Default.DiffExe;
            cmbMaxCompare.Text  = Default.MaximumComparable.ToString();

            optLoginAsRoot.Checked     = true;
            optSudo.Checked            = Default.RmExecutionMode == ConsoleCommandMode.Sudo;
            optInteractiveSudo.Checked = Default.RmExecutionMode == ConsoleCommandMode.InteractiveSudo;

            txtProxyHost.Text = _proxy.Host;
            txtProxyPort.Text = _proxy.Port.ToString();
            txtProxyUser.Text = _proxy.UserName;
            cmbProxy.Text     = _proxy.ProxyType;

            ProxyControls(Default.UseProxy);
        }
Exemplo n.º 17
0
        private void SynoReportClient_Load(object sender, EventArgs e)
        {
            try
            {
                FileInfo source  = null;
                string   entropy = "Is a gift a gift without wrapping?";
                if (!string.IsNullOrEmpty(Default.DPAPIVector) && !string.IsNullOrWhiteSpace(Default.DPAPIVector))
                {
                    try
                    {
                        source = new FileInfo(Default.DPAPIVector);
                    }
                    catch (ArgumentException)
                    {
                        //don't care if it's not a filename
                    }

                    if (source != null && source.Exists)
                    {
                        using (var sr = new StreamReader(source.FullName))
                        {
                            entropy = sr.ReadToEnd();
                        }
                    }
                    else
                    {
                        entropy = Default.DPAPIVector;
                    }
                }

                WrappedPassword <DSMAuthentication> .SetEntropy(entropy);

                WrappedPassword <DSMAuthenticationKeyFile> .SetEntropy(entropy);

                WrappedPassword <DefaultProxy> .SetEntropy(entropy);

                CustomSettings.Initialize(GetSection <CustomSettings>);

                PopulateServerTree();

                volumeHistoricChart1.Configuration = Profile;
                chartGrid1.Configuration           = Profile;

                duplicateCandidatesView1.MaximumComparable = Default.MaximumComparable;

                if (string.IsNullOrEmpty(Default.AutoRefreshServer) == false)
                {
                    string tag = Default.AutoRefreshServer;
                    if (Profile.DSMHosts.Items.ContainsKey(tag))
                    {
                        Task.Factory.StartNew(() => SynoReportClient_CacheUpdate(tag));
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 18
0
 public OutstandingInvoicesV1Controller(IXmlHelper XmlHelper, ICookieManager cookieManager, IUnitOfWorkFactory unitOfWorkFactory, OutstandingInvoiceService OutstandingInvoiceService)
     : base(cookieManager)
 {
     this.unitOfWork = unitOfWorkFactory.GetUnitOfWork();
     this.xmlHelper  = XmlHelper;
     this.OutstandingInvoiceService = OutstandingInvoiceService;
     customSettings = new CustomSettings();
 }
Exemplo n.º 19
0
 public UdpClient()
 {
     _settings          = _settingsLoader.ReadXml();
     _datagramCollector = new DatagramCollector();
     _datagramReceiver  = new DatagramReceiver(_settings, _datagramCollector);
     Console.WriteLine("-----------------------------");
     Console.WriteLine($" IP {_settings.IPAddress}, Port {_settings.Port} ");
 }
Exemplo n.º 20
0
 public UserHS(IOptions <CustomSettings> customSettingsOption,
               ILogger <UserHS> logger,
               IUserService userService)
 {
     _customSettings = customSettingsOption.Value;
     _logger         = logger;
     _userService    = userService;
 }
Exemplo n.º 21
0
        public void Setup()
        {
            ICustomSettings   customSettings   = new CustomSettings();
            IUrlDefinitions   urlDefinitions   = new UrlDefinitions(customSettings);
            IAddressLaunderer addressLaunderer = new AddressLaundering(urlDefinitions);

            uut = new AddressCoordinates(addressLaunderer, urlDefinitions);
        }
Exemplo n.º 22
0
        /// <summary>
        /// Saves the custom settings.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns></returns>
        public async Task SaveCustomSettings(CustomSettings settings)
        {
            EnsureArg.IsNotNull(settings, nameof(settings));
            var file = await GetSettings();

            file.CustomSettings = settings;
            await settingsSource.Save(file);
        }
Exemplo n.º 23
0
        internal Preferences(CustomSettings config)
        {
            InitializeComponent();

            _config = config;

            DataToControls(_config);
        }
Exemplo n.º 24
0
 public ProductsController(
     ILogger <ProductsController> logger,
     IProductRepo productRepo,
     IOptionsMonitor <CustomSettings> settings)
 {
     _settings    = settings.CurrentValue;
     _logger      = logger;
     _productRepo = productRepo;
 }
Exemplo n.º 25
0
        public void Sync()
        {
            if (!_settings.SyncWithHra)
            {
                _logger.Info("Syncing with HRA is off ");
                return;
            }
            var reportGenerationConfigurationFilePath = _settings.MedicareSyncCustomSettingsPath + "EventTestSync.xml";
            var customSettings = _customSettingXmlSerializer.Deserialize(reportGenerationConfigurationFilePath);

            if (customSettings == null || !customSettings.LastTransactionDate.HasValue)
            {
                customSettings = new CustomSettings {
                    LastTransactionDate = DateTime.Today
                };
            }
            var fromTime = customSettings.LastTransactionDate ?? DateTime.Today;
            //get all tags for IsHealthPlan is true
            var orgName = _settings.OrganizationNameForHraQuestioner;
            var tags    = _corporateAccountRepository.GetHealthPlanTags();

            if (tags != null && tags.Any())
            {
                foreach (var tag in tags)
                {
                    _logger.Info("Medicare Event Test Sync for tag : " + tag);

                    // get todays Events For the Tag

                    var eventIds = _eventRepository.GetEventsByTag(fromTime, tag);
                    if (eventIds.Any())
                    {
                        _logger.Info("Medicare Event Count  : " + eventIds.Count + " " + String.Join(",", eventIds));
                        var pairs = _eventTestRepository.GetTestAliasesByEventIds(eventIds).ToList();
                        var model = new MedicareEventTestSyncModel {
                            Tag = tag, EventTestAliases = pairs, OrganizationName = orgName, TimeToken = DateTime.UtcNow.ToLongTimeString().Encrypt()
                        };
                        try
                        {
                            var result = _medicareApiService.PostAnonymous <bool>(_settings.MedicareApiUrl + MedicareApiUrl.SyncEventTest, model);
                            if (!result)
                            {
                                _logger.Info("Medicare Event Test Sync FAILED for tag : " + tag);
                            }
                        }
                        catch (Exception exception)
                        {
                            _logger.Error(" error occur Medicare Event Test Sync for tag: " + tag +
                                          " Message: " + exception.Message + "\n stack Trace: " +
                                          exception.StackTrace);
                        }
                    }
                }
            }
            customSettings.LastTransactionDate = DateTime.Today;
            _customSettingXmlSerializer.SerializeandSave(reportGenerationConfigurationFilePath, customSettings);
        }
Exemplo n.º 26
0
        public void InvalidGEDCOMFormats()
        {
            CustomSettings test = new CustomSettings();

            test.ClearNonGEDCOMDateSettings();
            FactDate target;

            // invalid GEDCOM format dates
            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.DD_MM_YYYY, "dd/mm/yyyy", "/");
            target = new FactDate("5/6/2018");
            Assert.AreEqual(new DateTime(2018, 6, 5), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 6, 5), target.EndDate);

            target = new FactDate("BET 5/6/2018 AND 7/6/2018");
            Assert.AreEqual(new DateTime(2018, 6, 5), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 6, 7), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.MM_DD_YYYY, "mm/dd/yyyy", "/");
            target = new FactDate("5/6/2018");
            Assert.AreEqual(new DateTime(2018, 5, 6), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 5, 6), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.DD_MM_YYYY, "dd/mm/yyyy", ".");
            target = new FactDate("5.6.2018");
            Assert.AreEqual(new DateTime(2018, 6, 5), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 6, 5), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.MM_DD_YYYY, "mm/dd/yyyy", ".");
            target = new FactDate("5.6.2018");
            Assert.AreEqual(new DateTime(2018, 5, 6), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 5, 6), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.DD_MM_YYYY, "dd/mm/yyyy", "-");
            target = new FactDate("5-6-2018");
            Assert.AreEqual(new DateTime(2018, 6, 5), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 6, 5), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.MM_DD_YYYY, "mm/dd/yyyy", "-");
            target = new FactDate("5-6-2018");
            Assert.AreEqual(new DateTime(2018, 5, 6), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 5, 6), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.DD_MM_YYYY, "dd/mm/yyyy", " ");
            target = new FactDate("5 6 2018");
            Assert.AreEqual(new DateTime(2018, 6, 5), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 6, 5), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.MM_DD_YYYY, "mm/dd/yyyy", " ");
            target = new FactDate("5 6 2018");
            Assert.AreEqual(new DateTime(2018, 5, 6), target.StartDate);
            Assert.AreEqual(new DateTime(2018, 5, 6), target.EndDate);

            test.SetNonGEDCOMDateSettings(NonGEDCOMFormatSelected.DD_MM_YYYY, "dd/mm/yyyy", "/");
            target = new FactDate("AFT 4/6/2018");
            Assert.AreEqual(new DateTime(2018, 6, 5), target.StartDate);
            Assert.AreEqual(MAXDATE, target.EndDate);
        }
Exemplo n.º 27
0
 public ProductsController(
     IProductRepo productRepo,
     IOptionsSnapshot <CustomSettings> settings,
     ILogger <ProductsController> logger)
 {
     _settings    = settings.Value;
     _productRepo = productRepo;
     Logger       = logger;
 }
Exemplo n.º 28
0
 public PaymentService_Brasseler(IUnitOfWorkFactory unitOfWorkFactory, IPaymentGatewayFactory paymentGatewayFactory, ICustomerService customerService, IUserProfileUtilities userProfileUtilities, PaymentSettings paymentSettings, ICartOrderProviderFactory cartOrderProviderFactory, CustomSettings customSettings) : base(unitOfWorkFactory)
 {
     this.paymentGatewayFactory    = paymentGatewayFactory;
     this.customerService          = customerService;
     this.userProfileUtilities     = userProfileUtilities;
     this.paymentSettings          = paymentSettings;
     this.cartOrderProviderFactory = cartOrderProviderFactory;
     this.customSettings           = customSettings;
 }
Exemplo n.º 29
0
 public UdpServer()
 {
     _settings          = _settingsLoader.ReadXml();
     _datagramGenerator = new DatagramGenerator(_settings.DiapasonMin, _settings.DiapasonMax);
     _datagramSender    = new DatagramSender(_settings, _datagramGenerator);
     Console.WriteLine("-----------------------------");
     Console.WriteLine($"Diapason: Min {_settings.DiapasonMin}, Max {_settings.DiapasonMax} ");
     Console.WriteLine($" IP {_settings.IPAddress}, Port {_settings.Port} ");
 }
Exemplo n.º 30
0
 public TellAFriendService_Brasseler(IUnitOfWorkFactory unitOfWorkFactory, IEmailService emailService, IEmailTemplateUtilities emailTemplateUtilities, IContentManagerUtilities contentManagerUtilities) : base(unitOfWorkFactory, emailService)
 {
     this.UnitOfWorkFactory       = unitOfWorkFactory;
     this.UnitOfWork              = unitOfWorkFactory.GetUnitOfWork();
     this.EmailService            = emailService;
     this.EmailTemplateUtilities  = emailTemplateUtilities;
     this.ContentManagerUtilities = contentManagerUtilities;
     customSettings = new CustomSettings();
 }
 public OptionsController(IOptions<CustomSettings> settings)
 {
     this.settings = settings.Value;
 }
 public OptionsComponent(IOptions<CustomSettings> settings)
 {
     this.settings = settings.Value;
 }