internal InventorySettings GetInventorySettings()
 {
     var settings = new InventorySettings();
     settings.upload_type = ToaStringsUtil.GetString(_uploadType);
     settings.keys = _keyFields;
     return settings;
 }
Example #2
0
        internal InventorySettings GetInventorySettings()
        {
            var settings = new InventorySettings();

            settings.upload_type = ToaStringsUtil.GetString(_uploadType);
            settings.keys        = _keyFields;
            return(settings);
        }
Example #3
0
 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;
 }
Example #6
0
        public void LoadSettings()
        {
            var tax = _unitOfWork.InventorySettings.GetTax();

            if (tax != null)
            {
                InventorySettings = new InventorySettings
                {
                    Tax = (decimal)tax
                }
            }
            ;
        }
Example #7
0
        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);
        }
Example #8
0
 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;
 }
Example #10
0
        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());
        }
Example #11
0
        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.");
        }
Example #12
0
 /// <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;
 }