public MainWindow(ICatalogManager catMgr, IFinancialManager finMgr) { InitializeComponent(); _catMgr = catMgr; _finMgr = finMgr; var root = new TreeViewItem(); root.Header = "Tree"; var child = new TreeViewItem(); child.Header = "Initial Data Typing"; root.Items.Add(child); child = new TreeViewItem(); child.Header = "Descriptions"; root.Items.Add(child); MainTreeView.Items.Add(root); root.ExpandSubtree(); AreaComboBox.AddHandler(TextBoxBase.TextChangedEvent, new TextChangedEventHandler(ComboBox_TextChanged)); }
public MainWindow(ICatalogManager catMgr, IFinancialManager finMgr) { InitializeComponent(); _catMgr = catMgr; _finMgr = finMgr; var root = new TreeViewItem(); root.Header = "Tree"; var child = new TreeViewItem(); child.Header = "Initial Data Typing"; child.Selected += TreeViewItemSelected; child.Tag = typeof(InitialDataTypingView); root.Items.Add(child); child = new TreeViewItem(); child.Header = "Descriptions"; child.Selected += TreeViewItemSelected; child.Tag = typeof(DescriptionView); root.Items.Add(child); MainTreeView.Items.Add(root); root.ExpandSubtree(); }
public BaseCatalogVariantsRepository( IModelProvider modelProvider, IStorefrontContext storefrontContext, ISiteContext siteContext, ISearchInformation searchInformation, ISearchManager searchManager, ICatalogManager catalogManager, ICatalogUrlManager catalogUrlManager, IContext context) { Assert.ArgumentNotNull(modelProvider, nameof(modelProvider)); Assert.ArgumentNotNull(storefrontContext, nameof(storefrontContext)); Assert.ArgumentNotNull(siteContext, nameof(siteContext)); Assert.ArgumentNotNull(searchInformation, nameof(searchInformation)); Assert.ArgumentNotNull(searchManager, nameof(searchManager)); Assert.ArgumentNotNull(catalogManager, nameof(catalogManager)); Assert.ArgumentNotNull(catalogUrlManager, nameof(catalogUrlManager)); Assert.IsNotNull(context, nameof(context)); ModelProvider = modelProvider; StorefrontContext = storefrontContext; SiteContext = siteContext; SearchInformation = searchInformation; SearchManager = searchManager; CatalogManager = catalogManager; CatalogUrlManager = catalogUrlManager; Context = context; }
public GiftCardRepositoryTests() { _accountManagerMock = Substitute.For <IAccountManager>(); _catalogManagerMock = Substitute.For <ICatalogManager>(); _contactFactoryMock = Substitute.For <IContactFactory>(); }
/// <summary> /// Creates a new tile manager. /// </summary> /// <param name="feedManager">Provides access to remote and local <see cref="Feed"/>s. Handles downloading, signature verification and caching.</param> /// <param name="catalogManager">Provides access to remote and local <see cref="Catalog"/>s. Handles downloading, signature verification and caching.</param> /// <param name="iconCache">The icon cache used by newly created <see cref="IAppTile"/>s to retrieve application icons.</param> /// <param name="tileListMyApps">The <see cref="IAppTileList"/> used to represent the "my apps" <see cref="AppList"/>.</param> /// <param name="tileListCatalog">The <see cref="IAppTileList"/> used to represent the merged <see cref="Catalog"/>.</param> /// <param name="machineWide">Apply operations machine-wide instead of just for the current user.</param> public AppTileManagement([NotNull] IFeedManager feedManager, [NotNull] ICatalogManager catalogManager, [NotNull] IIconCache iconCache, [NotNull] IAppTileList tileListMyApps, [NotNull] IAppTileList tileListCatalog, bool machineWide) { #region Sanity checks if (feedManager == null) { throw new ArgumentNullException(nameof(feedManager)); } if (catalogManager == null) { throw new ArgumentNullException(nameof(catalogManager)); } if (iconCache == null) { throw new ArgumentNullException(nameof(iconCache)); } if (tileListMyApps == null) { throw new ArgumentNullException(nameof(tileListMyApps)); } if (tileListCatalog == null) { throw new ArgumentNullException(nameof(tileListCatalog)); } #endregion _feedManager = feedManager; _catalogManager = catalogManager; _iconCache = iconCache; _tileListMyApps = tileListMyApps; _tileListCatalog = tileListCatalog; _machineWide = machineWide; }
public static Catalog GetCachedSafe([NotNull] this ICatalogManager manager) { #region Sanity checks if (manager == null) { throw new ArgumentNullException(nameof(manager)); } #endregion try { return(manager.GetCached() ?? new Catalog()); } #region Error handling catch (IOException ex) { Log.Warn(ex.Message); return(new Catalog()); } catch (UnauthorizedAccessException ex) { Log.Warn(ex.Message); return(new Catalog()); } catch (InvalidDataException ex) { Log.Warn(ex.Message); return(new Catalog()); } #endregion }
public MainWindow(ICatalogManager catMgr) { InitializeComponent(); _catMgr = catMgr; var root = new TreeViewItem(); root.Header = "Tree"; var child = CreateTreeViewItem("Initial Data Typing"); child.Tag = typeof(InitialDataTypingForm); root.Items.Add(child); child = CreateTreeViewItem("Descriptions"); child.Tag = typeof(DescriptionsForm); root.Items.Add(child); MainTreeView.Items.Add(root); root.ExpandSubtree(); AreaComboBox.AddHandler(TextBoxBase.TextChangedEvent, new TextChangedEventHandler(ComboBox_TextChanged)); }
/// <summary> /// Creates a new tile manager. /// </summary> /// <param name="feedManager">Provides access to remote and local <see cref="Feed"/>s. Handles downloading, signature verification and caching.</param> /// <param name="catalogManager">Provides access to remote and local <see cref="Catalog"/>s. Handles downloading, signature verification and caching.</param> /// <param name="tileListMyApps">The <see cref="IAppTileList"/> used to represent the "my apps" <see cref="AppList"/>.</param> /// <param name="tileListCatalog">The <see cref="IAppTileList"/> used to represent the merged <see cref="Catalog"/>.</param> /// <param name="machineWide">Apply operations machine-wide instead of just for the current user.</param> public AppTileManagement([NotNull] IFeedManager feedManager, [NotNull] ICatalogManager catalogManager, [NotNull] IAppTileList tileListMyApps, [NotNull] IAppTileList tileListCatalog, bool machineWide) { #region Sanity checks if (feedManager == null) { throw new ArgumentNullException("feedManager"); } if (catalogManager == null) { throw new ArgumentNullException("catalogManager"); } if (tileListMyApps == null) { throw new ArgumentNullException("tileListMyApps"); } if (tileListCatalog == null) { throw new ArgumentNullException("tileListCatalog"); } #endregion _feedManager = feedManager; _catalogManager = catalogManager; _tileListMyApps = tileListMyApps; _tileListCatalog = tileListCatalog; _machineWide = machineWide; }
public GiftCardRepository( IAccountManager accountManager, IContactFactory contactFactory, ICatalogManager catalogManager) : base(accountManager, contactFactory) { this.CatalogManager = catalogManager; }
public SearchRepository( IAccountManager accountManager, IContactFactory contactFactory, ICatalogManager catalogManager) : base(accountManager, contactFactory) { this._catalogManager = catalogManager; }
public CustomEmailRecommendedProductsRepository( IModelProvider modelProvider, IStorefrontContext storefrontContext, ICatalogManager catalogManager, IInventoryManager inventoryManager, IVisitorContext visitorContext) : base(modelProvider, storefrontContext, catalogManager, inventoryManager, visitorContext) { }
/// <summary> /// Creates a new tile manager. /// </summary> /// <param name="feedManager">Provides access to remote and local <see cref="Feed"/>s. Handles downloading, signature verification and caching.</param> /// <param name="catalogManager">Provides access to remote and local <see cref="Catalog"/>s. Handles downloading, signature verification and caching.</param> /// <param name="iconStore">The icon store used by newly created <see cref="IAppTile"/>s to retrieve application icons.</param> /// <param name="tileListMyApps">The <see cref="IAppTileList"/> used to represent the "my apps" <see cref="AppList"/>.</param> /// <param name="tileListCatalog">The <see cref="IAppTileList"/> used to represent the merged <see cref="Catalog"/>.</param> /// <param name="machineWide">Apply operations machine-wide instead of just for the current user.</param> public AppTileManagement(IFeedManager feedManager, ICatalogManager catalogManager, IIconStore iconStore, IAppTileList tileListMyApps, IAppTileList tileListCatalog, bool machineWide) { _feedManager = feedManager ?? throw new ArgumentNullException(nameof(feedManager)); _catalogManager = catalogManager ?? throw new ArgumentNullException(nameof(catalogManager)); _iconStore = iconStore ?? throw new ArgumentNullException(nameof(iconStore)); _tileListMyApps = tileListMyApps ?? throw new ArgumentNullException(nameof(tileListMyApps)); _tileListCatalog = tileListCatalog ?? throw new ArgumentNullException(nameof(tileListCatalog)); _machineWide = machineWide; }
private void Window_Loaded(object sender, RoutedEventArgs e) { _catMgr = IoC.Get<ICatalogManager>(); var areas = _catMgr.GetAreas(); foreach (var item in areas) { AreaComboBox.Items.Add(item.Name); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { _catMgr = IoC.Get <ICatalogManager>(); var areas = _catMgr.GetAreas(); foreach (var item in areas) { AreaComboBox.Items.Add(item.Name); } }
public CatalogRepository( ISiteContext siteContext, IStorefrontContext storefrontContext, IVisitorContext visitorContext, ICatalogManager catalogManager, ISitecoreService sitecoreService, ISearchManager searchManager, ICurrencyProvider currencyProvider) : base(currencyProvider, siteContext, storefrontContext, visitorContext, catalogManager, sitecoreService) { this.searchManager = searchManager; }
public XcProductListRepository(IModelProvider modelProvider, IStorefrontContext storefrontContext, ISiteContext siteContext, ISearchInformation searchInformation, ISearchManager searchManager, ICatalogManager catalogManager, IInventoryManager inventoryManager, ICatalogUrlManager catalogUrlManager, IContext context) : base(modelProvider, storefrontContext, siteContext, searchInformation, searchManager, catalogManager, inventoryManager, catalogUrlManager, context) { }
public XcProductImagesRepository(IModelProvider modelProvider, IStorefrontContext storefrontContext, ISiteContext siteContext, ISearchInformation searchInformation, ISearchManager searchManager, ICatalogManager catalogManager, ICatalogUrlManager catalogUrlManager, IContext context, IXcBaseCatalogRepository xcBaseCatalogRepository) : base(modelProvider, storefrontContext, siteContext, searchInformation, searchManager, catalogManager, catalogUrlManager, context) { XcBaseCatalogRepository = xcBaseCatalogRepository; }
public Arrangement(bool orderExists, int orderAmount, ICatalogManager catalogManager) { SUT = new OrderManager(catalogManager); if (orderExists) { OrderId = Guid.NewGuid(); var order = new Dictionary <string, int>(); order.Add("Macbook", orderAmount); SUT.AddOrder(OrderId, order); } }
public CatalogRepository( [NotNull] IAccountManager accountManager, [NotNull] IContactFactory contactFactory, [NotNull] ICartManager cartManager, [NotNull] ICatalogManager catalogManager, [NotNull] IInventoryManager inventoryManager, [NotNull] IPricingManager pricingManager) : base(accountManager, contactFactory) { _cartManager = cartManager; _catalogManager = catalogManager; _inventoryManager = inventoryManager; _pricingManager = pricingManager; }
public BaseCatalogRepository( ICurrencyProvider currencyProvider, ISiteContext siteContext, IStorefrontContext storefrontContext, IVisitorContext visitorContext, ICatalogManager catalogManager, ISitecoreService sitecoreService) { this.CurrencyProvider = currencyProvider; this.SiteContext = siteContext; this.StorefrontContext = storefrontContext; this.VisitorContext = visitorContext; this.CatalogManager = catalogManager; this.SitecoreService = sitecoreService; }
/// <summary> /// Creates a new tile manager. /// </summary> /// <param name="feedManager">Provides access to remote and local <see cref="Feed"/>s. Handles downloading, signature verification and caching.</param> /// <param name="catalogManager">Provides access to remote and local <see cref="Catalog"/>s. Handles downloading, signature verification and caching.</param> /// <param name="iconCache">The icon cache used by newly created <see cref="IAppTile"/>s to retrieve application icons.</param> /// <param name="tileListMyApps">The <see cref="IAppTileList"/> used to represent the "my apps" <see cref="AppList"/>.</param> /// <param name="tileListCatalog">The <see cref="IAppTileList"/> used to represent the merged <see cref="Catalog"/>.</param> /// <param name="machineWide">Apply operations machine-wide instead of just for the current user.</param> public AppTileManagement([NotNull] IFeedManager feedManager, [NotNull] ICatalogManager catalogManager, [NotNull] IIconCache iconCache, [NotNull] IAppTileList tileListMyApps, [NotNull] IAppTileList tileListCatalog, bool machineWide) { #region Sanity checks if (feedManager == null) throw new ArgumentNullException(nameof(feedManager)); if (catalogManager == null) throw new ArgumentNullException(nameof(catalogManager)); if (iconCache == null) throw new ArgumentNullException(nameof(iconCache)); if (tileListMyApps == null) throw new ArgumentNullException(nameof(tileListMyApps)); if (tileListCatalog == null) throw new ArgumentNullException(nameof(tileListCatalog)); #endregion _feedManager = feedManager; _catalogManager = catalogManager; _iconCache = iconCache; _tileListMyApps = tileListMyApps; _tileListCatalog = tileListCatalog; _machineWide = machineWide; }
public ProductListRepository( ISiteContext siteContext, IStorefrontContext storefrontContext, IVisitorContext visitorContext, ICatalogManager catalogManager, ISitecoreService sitecoreService, ISearchInformationProvider searchInformationProvider, ISettingsProvider settingsProvider, ISearchManager searchManager, ICurrencyProvider currencyProvider) : base(currencyProvider, siteContext, storefrontContext, visitorContext, catalogManager, sitecoreService) { this.storefrontContext = storefrontContext; this.searchInformationProvider = searchInformationProvider; this.settingsProvider = settingsProvider; this.searchManager = searchManager; this.siteContext = siteContext; }
public static Catalog GetOnlineSafe([NotNull] this ICatalogManager manager) { #region Sanity checks if (manager == null) { throw new ArgumentNullException(nameof(manager)); } #endregion try { return(manager.GetOnline()); } #region Error handling catch (IOException ex) { Log.Warn(ex); return(new Catalog()); } catch (WebException ex) { Log.Warn(ex); return(new Catalog()); } catch (InvalidDataException ex) { Log.Warn(ex); return(new Catalog()); } catch (SignatureException ex) { Log.Warn(ex); return(new Catalog()); } catch (UriFormatException ex) { Log.Warn(ex); return(new Catalog()); } #endregion }
public static Catalog GetCachedSafe(this ICatalogManager manager) { #region Sanity checks if (manager == null) { throw new ArgumentNullException(nameof(manager)); } #endregion try { return(manager.GetCached() ?? new()); } #region Error handling catch (Exception ex) when(ex is IOException or UnauthorizedAccessException or InvalidDataException) { Log.Warn(Resources.ErrorLoadingCatalog, ex); return(new()); } #endregion }
public static Catalog GetOnlineSafe(this ICatalogManager manager) { #region Sanity checks if (manager == null) { throw new ArgumentNullException(nameof(manager)); } #endregion try { return(manager.GetOnline()); } #region Error handling catch (Exception ex) when(ex is UriFormatException or WebException or IOException or UnauthorizedAccessException or InvalidDataException or SignatureException) { Log.Warn(ex); return(new()); } #endregion } }
public Arrangement(bool orders, bool existingUser, IOrderManager orderManager, ICatalogManager catalogManager) { SUT = new UserManager(orderManager, catalogManager); if (existingUser) { var user = new UserDetailsModel() { FirstName = "First", Surname = "Second", UserId = UserId = Guid.NewGuid() }; SUT.AddUser(user); } if (orders) { SUT.AddOrder(UserId, Guid.NewGuid()); } }
public UpdateCatalogHandler(ICatalogManager catalogManager) { this.catalogManager = catalogManager ?? throw new ArgumentNullException(nameof(catalogManager)); }
public PurchasableProductListRepository(IModelProvider modelProvider, IStorefrontContext storefrontContext, ISiteContext siteContext, ISearchInformation searchInformation, ISearchManager searchManager, ICatalogManager catalogManager, IInventoryManager inventoryManager, ICatalogUrlManager catalogUrlManager, IContext context, IProductListCacheProvider productListCacheProvider, IBulkManager bulkManager) : base(modelProvider, storefrontContext, siteContext, searchInformation, searchManager, catalogManager, inventoryManager, catalogUrlManager, context, productListCacheProvider, bulkManager) { _storefrontContext = storefrontContext; }
public AddProductSupplierCommand(IConfiguration configuration, ICatalogManager catalogManager) : base( "addProductSupplier", "Adds a new supplier with barcodes for an existing product to acquiree catalog") { _configuration = configuration; _catalogManager = catalogManager; }
public OrderManager(ICatalogManager catalogManager) { this.catalogManager = catalogManager ?? throw new ArgumentNullException(nameof(catalogManager)); }
public CartManager(ICatalogManager catalog) { this.catalog = catalog ?? throw new ArgumentNullException(nameof(catalog)); }
public CatalogController(IMapper mapper, ICatalogManager catalogManager) : base(mapper) { _catalogManager = catalogManager; }