internal InventorySettings GetInventorySettings() { var settings = new InventorySettings(); settings.upload_type = ToaStringsUtil.GetString(_uploadType); settings.keys = _keyFields; return settings; }
internal InventorySettings GetInventorySettings() { var settings = new InventorySettings(); settings.upload_type = ToaStringsUtil.GetString(_uploadType); settings.keys = _keyFields; return(settings); }
public TownEvent(string name, TownSettings towns, InventorySettings invSettings) { this.Context = Context.Town; this.Name = name == string.Empty ? "Rome" : name; this.EventAction = Event; _i = invSettings.Default; _towns = towns; }
public ProcessInventory_Override( Lazy <IProductUtilities> productUtilities, Lazy <IInventoryPipeline> inventoryPipeline, InventorySettings inventorySettings) { this.productUtilities = productUtilities; this.inventoryPipeline = inventoryPipeline; this.inventorySettings = inventorySettings; }
public AddFreeProduct_Brasseler(ICartPipeline cartPipeline, IOrderLineUtilities orderLineUtilities, IPricingServiceFactory pricingServiceFactory, ICustomerOrderUtilities customerOrderUtilities, IUnitOfWorkFactory unitOfWorkFactory, IPricingPipeline PricingPipeline, IPromotionAmountProvider promotionProvider, InventorySettings inventorySettings, Lazy <IInventoryPipeline> inventoryPipeline, IProductUtilities productUtilities) : base(PricingPipeline, promotionProvider) { this.CustomerOrderUtilities = customerOrderUtilities; this.UnitOfWork = unitOfWorkFactory.GetUnitOfWork(); this.pricingPipeline = PricingPipeline; this.ProductUtilities = productUtilities; this.CartPipeline = cartPipeline; this.OrderLineUtilities = orderLineUtilities; this.InventorySettings = inventorySettings; this.InventoryPipeline = inventoryPipeline; }
public void LoadSettings() { var tax = _unitOfWork.InventorySettings.GetTax(); if (tax != null) { InventorySettings = new InventorySettings { Tax = (decimal)tax } } ; }
public void WhenSettingsSaved_GetSettingsReturnsData() { var baseKey = hkcu.CreateSubKey(TestKeyPath); var repository = new InventorySettingsRepository(baseKey); var originalSettings = new InventorySettings() { Username = "******" }; repository.SetSettings(originalSettings); var settings = repository.GetSettings(); Assert.AreEqual(originalSettings.Username, settings.Username); }
public UpdateCartCreateSSOrder(ICustomerOrderUtilities customerOrderUtilities, IOrderLineUtilities orderLineUtilities, ICartPipeline cartPipeline, Lazy <IPromotionEngine> promotionEngine, IPricingPipeline pricingPipeline, OrderManagementGeneralSettings orderManagementGeneralSettings, ICurrencyFormatProvider currencyFormatProvider, Lazy <IEntityTranslationService> entityTranslationService, Lazy <IEmailService> emailService, Lazy <IProductUtilities> productUtilities, Lazy <IInventoryPipeline> inventoryPipeline, InventorySettings inventorySettings, Lazy <ITranslationLocalizer> translationLocalizer, CustomSettings customSettings) { this.CustomerOrderUtilities = customerOrderUtilities; OrderLineUtilities = orderLineUtilities; CartPipeline = cartPipeline; this.PromotionEngine = promotionEngine; this.PricingPipeline = pricingPipeline; this.OrderManagementGeneralSettings = orderManagementGeneralSettings; this.CurrencyFormatProvider = currencyFormatProvider; this.EmailService = emailService; this.ProductUtilities = productUtilities; this.inventoryPipeline = inventoryPipeline; this.inventorySettings = inventorySettings; this.translationLocalizer = translationLocalizer; EntityTranslationService = entityTranslationService; this.customSettings = customSettings; }
/// <summary> /// Ctor /// </summary> public ReturnService(IRepository <Return> returnRepository, IRepository <StoreLocator> storeLocatorRepository, IRepository <StoreLocatorItemLog> storeLocatorItemLogRepository, IStoreService storeService, IRepository <IssueItem> issueItemRepository, DapperContext dapperContext, IDbContext dbContext, InventorySettings inventorySettings) { this._returnRepository = returnRepository; this._storeLocatorRepository = storeLocatorRepository; this._storeLocatorItemLogRepository = storeLocatorItemLogRepository; this._storeService = storeService; this._issueItemRepository = issueItemRepository; this._dapperContext = dapperContext; this._dbContext = dbContext; this._inventorySettings = inventorySettings; }
public static RegistryInventory[] GetResultsFromRuleset(InventorySettings Settings) { List <RegistryInventory> tmpResults = new List <RegistryInventory>(); foreach (InventoryRule rule in Settings.InventoryRules) { var results = new RuleHandler(rule).GetResults(); if (!(results is null)) { tmpResults.AddRange(results); } } // Remove Duplicate Results tmpResults = tmpResults.GroupBy(x => new { x.KeyPath, x.Name }).Select(p => p.First()).ToList(); return(tmpResults.ToArray()); }
public static IEnumerable <RegistryInventory> EnumerateInstances() { LoadOptions(); Log.LogLocation = logPath; Log.LogEnabled = logEnabled; Log.Write("Beginning enumeration of WMI Class"); if (!providerEnabled) { Log.Write("Provider has been disabled by provider settings in the registry. Exiting without returning any instances."); yield break; } if (!System.IO.File.Exists(definitionPath)) { Log.Write($"Definition file could not be found at \"{definitionPath}\". Exiting without returning any instances."); yield break; } //Load Definition InventorySettings RegistryInventorySetting = InventorySettings.LoadFromFile(definitionPath); if (RegistryInventorySetting is null) { Log.Write($"Definition file was unable to load. Exiting without returning any instances."); yield break; } if (!RegistryInventorySetting.Enabled) { Log.Write($"Provider has been disabled by provider settings in the definition file. Exiting without returning any instances."); yield break; } // Yield Results foreach (RegistryInventory Result in ResultCollector.GetResultsFromRuleset(RegistryInventorySetting)) { yield return(Result); } Log.Write("Sucessfully finished enumeration. Exiting."); }
/// <summary> /// Ctor /// </summary> public StoreService(IRepository <Store> storeRepository, IRepository <StoreLocator> storeLocatorRepository, IRepository <StoreItem> storeItemRepository, IRepository <StoreLocatorItem> storeLocatorItemRepository, IRepository <StoreLocatorItemLog> storeLocatorItemLogRepository, IRepository <StoreLocatorReservation> storeLocatorReservationRepository, IRepository <Item> itemRepository, DapperContext dapperContext, IDbContext dbContext, InventorySettings inventorySettings) { this._storeRepository = storeRepository; this._storeLocatorRepository = storeLocatorRepository; this._storeItemRepository = storeItemRepository; this._storeLocatorItemRepository = storeLocatorItemRepository; this._storeLocatorItemLogRepository = storeLocatorItemLogRepository; this._storeLocatorReservationRepository = storeLocatorReservationRepository; this._itemRepository = itemRepository; this._dapperContext = dapperContext; this._dbContext = dbContext; this._inventorySettings = inventorySettings; }