Пример #1
0
        public void Dispose()
        {
            _searchWorkerResetEvent.WaitOne();

            _repo     = null;
            _callback = null;
        }
        public void Dispose()
        {
            _searchWorkerResetEvent.WaitOne();

            _repo = null;
            _callback = null;
        }
Пример #3
0
        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);
        }
Пример #5
0
        public void DoSearch(string productName, IProductSearchRepository <Product> repo)
        {
            if (_productSearchWorker != null)
            {
                _productSearchWorker.CancelSearch();
            }

            _productSearchWorker = new ProductSearchWorker(repo, ProcessSearchResult, productName);
        }
Пример #6
0
        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;
        }
Пример #8
0
 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;
 }
Пример #9
0
 public void Dispose()
 {
     _repo = null;
 }
Пример #10
0
 public ProductRepositoryHarness(IProductSearchRepository <Product> repo)
 {
     _repo = repo;
 }