public void Dispose() { _searchWorkerResetEvent.WaitOne(); _repo = null; _callback = null; }
public ProductSearchWorker(IProductSearchRepository <Product> repo, Action <ProductSearchResult, IProductSearchWorker> callback, string productName) { _repo = repo; _callback = callback; BeginSearch(productName); }
public ProductSearchWorker(IProductSearchRepository<Product> repo, Action<ProductSearchResult, IProductSearchWorker> callback, string productName) { _repo = repo; _callback = callback; BeginSearch(productName); }
public void DoSearch(string productName, IProductSearchRepository <Product> repo) { if (_productSearchWorker != null) { _productSearchWorker.CancelSearch(); } _productSearchWorker = new ProductSearchWorker(repo, ProcessSearchResult, productName); }
public MainWindowViewModel() { SearchCommand = new RelayCommand <string>(DoSearch); _productSearchManager = new ProductSearchManager(); _productSearchManager.ResultsRecieved += ProductSearchManagerResultsRecieved; _productSearchRepository = new BestBuyProductRepository(); ProductImage = BlankImage; }
public MainWindowViewModel() { SearchCommand = new RelayCommand<string>(DoSearch); _productSearchManager = new ProductSearchManager(); _productSearchManager.ResultsRecieved += ProductSearchManagerResultsRecieved; _productSearchRepository = new BestBuyProductRepository(); ProductImage = BlankImage; }
public ProductsService( IEventBus eventBus, CatalogContext catalogContext, IProductSearchRepository productSearchRepository, IProductIndexingRepository productIndexingRepository, IStringLocalizer <GlobalResources> globalLocalizer, IStringLocalizer <ProductResources> productLocalizer) { this.eventBus = eventBus; this.catalogContext = catalogContext; this.productSearchRepository = productSearchRepository; this.productIndexingRepository = productIndexingRepository; this.globalLocalizer = globalLocalizer; this.productLocalizer = productLocalizer; }
public void Dispose() { _repo = null; }
public ProductRepositoryHarness(IProductSearchRepository <Product> repo) { _repo = repo; }