public static void Start() { _serializer = new System.Xml.Serialization.XmlSerializer(typeof(PerformanceSettings)); if (File.Exists(DAL.ApplicationSettings.Settings.RoamingPerformanceProfilesPath)) { using (var streamReader = new StreamReader(DAL.ApplicationSettings.Settings.RoamingPerformanceProfilesPath)) { Settings = (PerformanceSettings)_serializer.Deserialize(streamReader); } } else if (File.Exists(DAL.ApplicationSettings.Settings.PerformanceProfilesPath)) { using (var streamReader = new StreamReader(DAL.ApplicationSettings.Settings.PerformanceProfilesPath)) { Settings = (PerformanceSettings)_serializer.Deserialize(streamReader); } } else { Settings = new PerformanceSettings(); Settings.PrintJobGenerationMultiThreading = true; Settings.PrintJobGenerationMaxMemory = 2048; //save default settings to XML Save(); } }
public UrlService( SmartDbContext db, ICacheManager cache, IHttpContextAccessor httpContextAccessor, IWorkContext workContext, IStoreContext storeContext, ILanguageService languageService, LocalizationSettings localizationSettings, SeoSettings seoSettings, PerformanceSettings performanceSettings, SecuritySettings securitySettings) { _db = db; _cache = cache; _httpContextAccessor = httpContextAccessor; _workContext = workContext; _storeContext = storeContext; _languageService = languageService; _localizationSettings = localizationSettings; _seoSettings = seoSettings; _performanceSettings = performanceSettings; _securitySettings = securitySettings; _prefetchedCollections = new Dictionary <string, UrlRecordCollection>(StringComparer.OrdinalIgnoreCase); _extraSlugLookup = new Dictionary <string, UrlRecord>(); ValidateCacheState(); }
public frmUserPreference(Core.Managers.UserProfileInfo userProfile, PerformanceSettings performanceSettings) { InitializeComponent(); AdvancedPreferencesSettingAdd(); /// this.lblHeaderText = this.Text; // this.Icon = Core.Managers.BrandingManager.MainForm_Icon; this.DefaultPreferences = new Core.UserPreferences.DefaultPreferences(userProfile); this.AdvancedPreferences = new Core.UserPreferences.AdvancedPreferences(userProfile, performanceSettings); #if LOCTITE // this.gpAdvancedSettings.SelectedItemWithFocusBackColor = this.gpAdvancedSettings.CommandsBorderColor = this.gpAdvancedSettings.LineColor = Core.Managers.BrandingManager.DockPanelTitleBackground; this.gpDisplaySoftware.Visible = false; #endif this.gpAdvancedSettings.Visible = false; //default settings this.chkAnnotations.Checked = this.DefaultPreferences.SelectionOptions.UseAnnotations; this.chkAnnotations.CheckedChanged += chkDefaultPreferences_CheckedChanged; this.chkXYZAxis.Checked = this.DefaultPreferences.SelectionOptions.ShowXYZAxis; this.chkXYZAxis.CheckedChanged += chkDefaultPreferences_CheckedChanged; this.chkUserInterfaceUseLargeToolbarIcons.Checked = this.DefaultPreferences.UserInterface.UseLargeToolbarIcons; this.chkUserInterfaceUseLargeToolbarIcons.CheckedChanged += chkDefaultPreferences_CheckedChanged; this.chkSoftwareCheckForSoftwareUpdates.Checked = this.DefaultPreferences.SoftwareOptions.CheckForSoftwareUpdates; this.chkSoftwareCheckForSoftwareUpdates.CheckedChanged += chkDefaultPreferences_CheckedChanged; }
internal AdvancedPreferences(Managers.UserProfileInfo userProfile, PerformanceSettings performanceSettings) { this.ModelPreferences = new AdvancedModelPreferences(userProfile.Settings_PrintJob_MirrorObjects, userProfile.Settings_PrintJob_FirstSlice_MinAmountOfPixels); this.SupportEnginePreferences = new AdvancedSupportEnginePreferences(userProfile.SupportEngine_Basement_Thickness, userProfile.SupportEngine_Penetration_Depth); this.PerformancePreferences = new AdvancedPerformancePreferences(performanceSettings.PrintJobGenerationMultiThreading); this.LicensesPreferences = new AdvancedLicensesPreferences(userProfile.LicenseServer_ServerName); }
public TodoService(PerformanceSettings performanceSettings , ITodoClientBuilder todoClientBuilder , AuthorizationMetadataBuilder metadataBuilder) { _performanceSettings = performanceSettings; _todoClientBuilder = todoClientBuilder; _metadataBuilder = metadataBuilder; }
public ProductAttributeMaterializer( SmartDbContext db, ICacheManager cache, PerformanceSettings performanceSettings) { _db = db; _cache = cache; _performanceSettings = performanceSettings; }
public MapperSettings() { Paths = new PathSettings(); UI = new UISettings(); View = new ViewSettings(); Performance = new PerformanceSettings(); Paths.DataDirs = new List <string>(); Paths.DataFiles = new List <string>(); }
public MapperSettings() { Paths = new PathSettings(); UI = new UISettings(); View = new ViewSettings(); Performance = new PerformanceSettings(); Paths.DataDirs = new List<string>(); Paths.DataFiles = new List<string>(); }
public LocalizedEntityService(SmartDbContext db, ICacheManager cache, PerformanceSettings performanceSettings) { _db = db; _cache = cache; _performanceSettings = performanceSettings; _prefetchedCollections = new Dictionary <string, LocalizedPropertyCollection>(StringComparer.OrdinalIgnoreCase); ValidateCacheState(); }
public LocalizedEntityService( ICacheManager cacheManager, IRepository <LocalizedProperty> localizedPropertyRepository, PerformanceSettings performanceSettings) { _cacheManager = cacheManager; _localizedPropertyRepository = localizedPropertyRepository; _performanceSettings = performanceSettings; _prefetchedCollections = new Dictionary <string, LocalizedPropertyCollection>(StringComparer.OrdinalIgnoreCase); ValidateCacheState(); }
public ProductAttributeParser( IProductAttributeService productAttributeService, IRepository <ProductVariantAttributeCombination> pvacRepository, IRequestCache requestCache, ICacheManager cache, PerformanceSettings performanceSettings) { _productAttributeService = productAttributeService; _pvacRepository = pvacRepository; _requestCache = requestCache; _cache = cache; _performanceSettings = performanceSettings; }
public frmUserPreferences(UserProfileInfo userProfile, PerformanceSettings performanceSettings) { InitializeComponent(); //add check png's this.ilCheckbox.Images.Clear(); this.ilCheckbox.Images.Add(Properties.Resources.checkbox_not_checked); this.ilCheckbox.Images.Add(BrandingManager.Checkbox_Checked); this.chkSkip.Checked = userProfile.Settings_Skip_Welcome_Screen_On_Next_Start; this.chkTouchModeEnabled.Checked = userProfile.Settings_Enable_Touch_Interface_Mode; this.chkBasement.Checked = userProfile.Settings_Use_Support_Basement; this.chkUseNumericInputForPositioning.Checked = userProfile.Settings_Use_Numeric_Input_For_Positioning; }
public UrlRecordService( ICacheManager cacheManager, IRepository <UrlRecord> urlRecordRepository, SeoSettings seoSettings, PerformanceSettings performanceSettings) { _cacheManager = cacheManager; _urlRecordRepository = urlRecordRepository; _seoSettings = seoSettings; _performanceSettings = performanceSettings; _prefetchedCollections = new Dictionary <string, UrlRecordCollection>(StringComparer.OrdinalIgnoreCase); ValidateCacheState(); }
public SettingsHub() { MenuSettings = new CoreSettings(); DpsMeterSettings = new DpsMeterSettings(); MapIconsSettings = new MapIconsSettings(); ItemAlertSettings = new ItemAlertSettings(); AdvancedTooltipSettings = new AdvancedTooltipSettings(); MonsterTrackerSettings = new MonsterTrackerSettings(); PoiTrackerSettings = new PoiTrackerSettings(); PreloadAlertSettings = new PreloadAlertSettings(); XpRateSettings = new XpRateSettings(); HealthBarSettings = new HealthBarSettings(); KillCounterSettings = new KillCounterSettings(); PerformanceSettings = new PerformanceSettings(); }
public ProductAttributeMaterializer( SmartDbContext db, IHttpContextAccessor httpContextAccessor, IRequestCache requestCache, ICacheManager cache, Lazy <IDownloadService> downloadService, Lazy <CatalogSettings> catalogSettings, PerformanceSettings performanceSettings) { _db = db; _httpContextAccessor = httpContextAccessor; _requestCache = requestCache; _cache = cache; _downloadService = downloadService; _catalogSettings = catalogSettings; _performanceSettings = performanceSettings; }
private string ValidateSeName <TEntity>(TEntity entity, string name) where TEntity : BaseEntity, ISlugSupported { var seoSettings = new SeoSettings { LoadAllUrlAliasesOnStartup = false }; var perfSettings = new PerformanceSettings(); if (_urlRecordService == null) { _urlRecordService = new UrlRecordService( NullCache.Instance, new EfRepository <UrlRecord>(_ctx) { AutoCommitEnabled = false }, seoSettings, perfSettings); } return(entity.ValidateSeName <TEntity>("", name, true, _urlRecordService, seoSettings)); }
public MybatisExecutionDataManager(ProcessEngineConfigurationImpl processEngineConfiguration) : base(processEngineConfiguration) { this.performanceSettings = processEngineConfiguration.PerformanceSettings; }
public CatalogHelper( SmartDbContext db, ICommonServices services, IMenuService menuService, IManufacturerService manufacturerService, IProductService productService, //IProductTemplateService productTemplateService, IProductAttributeService productAttributeService, IProductAttributeMaterializer productAttributeMaterializer, IProductAttributeFormatter productAttributeFormatter, ITaxService taxService, ICurrencyService currencyService, IMediaService mediaService, IPriceCalculationService priceCalculationService, //IPriceFormatter priceFormatter, //ISpecificationAttributeService specificationAttributeService, IDateTimeHelper dateTimeHelper, //IBackInStockSubscriptionService backInStockSubscriptionService, IDownloadService downloadService, MediaSettings mediaSettings, CatalogSettings catalogSettings, CustomerSettings customerSettings, CaptchaSettings captchaSettings, IMeasureService measureService, //IQuantityUnitService quantityUnitService, MeasureSettings measureSettings, TaxSettings taxSettings, PerformanceSettings performanceSettings, IDeliveryTimeService deliveryTimeService, Lazy <IDataExporter> dataExporter, ICatalogSearchService catalogSearchService, ICatalogSearchQueryFactory catalogSearchQueryFactory, IUrlHelper urlHelper, ProductUrlHelper productUrlHelper, ILocalizedEntityService localizedEntityService, IUrlService urlService, ILinkResolver linkResolver) { _db = db; _services = services; _workContext = services.WorkContext; _storeContext = services.StoreContext; _cache = services.Cache; _menuService = menuService; _manufacturerService = manufacturerService; _productService = productService; //_productTemplateService = productTemplateService; _productAttributeService = productAttributeService; _productAttributeMaterializer = productAttributeMaterializer; _productAttributeFormatter = productAttributeFormatter; _taxService = taxService; _currencyService = currencyService; _mediaService = mediaService; _localizationService = _services.Localization; _priceCalculationService = priceCalculationService; //_priceFormatter = priceFormatter; //_specificationAttributeService = specificationAttributeService; _dateTimeHelper = dateTimeHelper; //_backInStockSubscriptionService = backInStockSubscriptionService; _downloadService = downloadService; _measureService = measureService; //_quantityUnitService = quantityUnitService; _measureSettings = measureSettings; _taxSettings = taxSettings; _performanceSettings = performanceSettings; _deliveryTimeService = deliveryTimeService; _mediaSettings = mediaSettings; _catalogSettings = catalogSettings; _customerSettings = customerSettings; _captchaSettings = captchaSettings; _dataExporter = dataExporter; _catalogSearchService = catalogSearchService; _catalogSearchQueryFactory = catalogSearchQueryFactory; _urlHelper = urlHelper; _productUrlHelper = productUrlHelper; _localizedEntityService = localizedEntityService; _urlService = urlService; _linkResolver = linkResolver; _httpRequest = _urlHelper.ActionContext.HttpContext.Request; }
public new void SetUp() { #region Test data //color (dropdownlist) pa1 = new ProductAttribute { Id = 1, Name = "Color", }; pva1_1 = new ProductVariantAttribute { Id = 11, ProductId = 1, TextPrompt = "Select color:", IsRequired = true, AttributeControlType = AttributeControlType.DropdownList, DisplayOrder = 1, ProductAttribute = pa1, ProductAttributeId = pa1.Id }; pvav1_1 = new ProductVariantAttributeValue { Id = 11, Name = "Green", DisplayOrder = 1, ProductVariantAttribute = pva1_1, ProductVariantAttributeId = pva1_1.Id }; pvav1_2 = new ProductVariantAttributeValue { Id = 12, Name = "Red", DisplayOrder = 2, ProductVariantAttribute = pva1_1, ProductVariantAttributeId = pva1_1.Id }; pva1_1.ProductVariantAttributeValues.Add(pvav1_1); pva1_1.ProductVariantAttributeValues.Add(pvav1_2); //custom option (checkboxes) pa2 = new ProductAttribute { Id = 2, Name = "Some custom option", }; pva2_1 = new ProductVariantAttribute { Id = 21, ProductId = 1, TextPrompt = "Select at least one option:", IsRequired = true, AttributeControlType = AttributeControlType.Checkboxes, DisplayOrder = 2, ProductAttribute = pa2, ProductAttributeId = pa2.Id }; pvav2_1 = new ProductVariantAttributeValue { Id = 21, Name = "Option 1", DisplayOrder = 1, ProductVariantAttribute = pva2_1, ProductVariantAttributeId = pva2_1.Id }; pvav2_2 = new ProductVariantAttributeValue { Id = 22, Name = "Option 2", DisplayOrder = 2, ProductVariantAttribute = pva2_1, ProductVariantAttributeId = pva2_1.Id }; pva2_1.ProductVariantAttributeValues.Add(pvav2_1); pva2_1.ProductVariantAttributeValues.Add(pvav2_2); //custom text pa3 = new ProductAttribute { Id = 3, Name = "Custom text", }; pva3_1 = new ProductVariantAttribute { Id = 31, ProductId = 1, TextPrompt = "Enter custom text:", IsRequired = true, AttributeControlType = AttributeControlType.TextBox, DisplayOrder = 1, ProductAttribute = pa1, ProductAttributeId = pa3.Id }; #endregion _productAttributeRepo = MockRepository.GenerateMock <IRepository <ProductAttribute> >(); _productAttributeRepo.Expect(x => x.Table).Return(new List <ProductAttribute> { pa1, pa2, pa3 }.AsQueryable()); _productAttributeRepo.Expect(x => x.GetById(pa1.Id)).Return(pa1); _productAttributeRepo.Expect(x => x.GetById(pa2.Id)).Return(pa2); _productAttributeRepo.Expect(x => x.GetById(pa3.Id)).Return(pa3); _productAttributeOptionRepo = MockRepository.GenerateMock <IRepository <ProductAttributeOption> >(); _productAttributeOptionsSetRepo = MockRepository.GenerateMock <IRepository <ProductAttributeOptionsSet> >(); _productVariantAttributeRepo = MockRepository.GenerateMock <IRepository <ProductVariantAttribute> >(); _productVariantAttributeRepo.Expect(x => x.Table).Return(new List <ProductVariantAttribute> { pva1_1, pva2_1, pva3_1 }.AsQueryable()); _productVariantAttributeRepo.Expect(x => x.GetById(pva1_1.Id)).Return(pva1_1); _productVariantAttributeRepo.Expect(x => x.GetById(pva2_1.Id)).Return(pva2_1); _productVariantAttributeRepo.Expect(x => x.GetById(pva3_1.Id)).Return(pva3_1); _productVariantAttributeCombinationRepo = MockRepository.GenerateMock <IRepository <ProductVariantAttributeCombination> >(); _productVariantAttributeCombinationRepo.Expect(x => x.Table).Return(new List <ProductVariantAttributeCombination>().AsQueryable()); _productVariantAttributeValueRepo = MockRepository.GenerateMock <IRepository <ProductVariantAttributeValue> >(); _productVariantAttributeValueRepo.Expect(x => x.Table).Return(new List <ProductVariantAttributeValue> { pvav1_1, pvav1_2, pvav2_1, pvav2_2 }.AsQueryable()); _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav1_1.Id)).Return(pvav1_1); _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav1_2.Id)).Return(pvav1_2); _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav2_1.Id)).Return(pvav2_1); _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav2_2.Id)).Return(pvav2_2); _productBundleItemAttributeFilter = MockRepository.GenerateMock <IRepository <ProductBundleItemAttributeFilter> >(); _localizedEntityService = MockRepository.GenerateMock <ILocalizedEntityService>(); _performanceSettings = MockRepository.GenerateMock <PerformanceSettings>(); _productAttributeService = new ProductAttributeService( NullRequestCache.Instance, _productAttributeRepo, _productAttributeOptionRepo, _productAttributeOptionsSetRepo, _productVariantAttributeRepo, _productVariantAttributeCombinationRepo, _productVariantAttributeValueRepo, _productBundleItemAttributeFilter, _localizedEntityService); _productAttributeParser = new ProductAttributeParser(_productAttributeService, new MemoryRepository <ProductVariantAttributeCombination>(), NullRequestCache.Instance, NullCache.Instance, _performanceSettings); var workingLanguage = new Language(); _workContext = MockRepository.GenerateMock <IWorkContext>(); _workContext.Expect(x => x.WorkingLanguage).Return(workingLanguage); _currencyService = MockRepository.GenerateMock <ICurrencyService>(); _localizationService = MockRepository.GenerateMock <ILocalizationService>(); _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Virtual")).Return("For: {0} <{1}>"); _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Virtual")).Return("From: {0} <{1}>"); _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Physical")).Return("For: {0}"); _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Physical")).Return("From: {0}"); _taxService = MockRepository.GenerateMock <ITaxService>(); _priceFormatter = MockRepository.GenerateMock <IPriceFormatter>(); _downloadService = MockRepository.GenerateMock <IDownloadService>(); _webHelper = MockRepository.GenerateMock <IWebHelper>(); _priceCalculationService = MockRepository.GenerateMock <IPriceCalculationService>(); _shoppingCartSettings = MockRepository.GenerateMock <ShoppingCartSettings>(); _catalogSettings = MockRepository.GenerateMock <CatalogSettings>(); _productAttributeFormatter = new ProductAttributeFormatter(_workContext, _productAttributeService, _productAttributeParser, _priceCalculationService, _currencyService, _localizationService, _taxService, _priceFormatter, _downloadService, _webHelper, _shoppingCartSettings, _catalogSettings); }