public SearchCoordinator(TweetHuntViewModel viewModel,
                                 SearchConfiguration configuration)
        {
            _model = viewModel;
            _timer = configuration.Timer;
            _searchService = configuration.SearchService;
            
            _model.SearchItems.CollectionChanged += SearchItemsCollectionChanged;
            _timer.Tick += (s, e) => InitiateSearch();
            _searchService.SearchComplete += SearchComplete;

            _minSecondsBetweenItemSearch = configuration.MinSecondsBetweenItemSearch;            
        }
Example #2
0
        public SearchCoordinator(TweetHuntViewModel viewModel,
                                 SearchConfiguration configuration)
        {
            _model         = viewModel;
            _timer         = configuration.Timer;
            _searchService = configuration.SearchService;

            _model.SearchItems.CollectionChanged += SearchItemsCollectionChanged;
            _timer.Tick += (s, e) => InitiateSearch();
            _searchService.SearchComplete += SearchComplete;

            _minSecondsBetweenItemSearch = configuration.MinSecondsBetweenItemSearch;
        }
 public virtual void Setup()
 {
     SystemTime.Now = () => _now;
     _searchService = new FakeTwitterSearchService();
     _timer = new FakeSearchTimer();
     var configuration = new SearchConfiguration()
     {
         MinSecondsBetweenItemSearch = 300,
         MaxSearchResults = _maxSearchResults,
         SearchService = _searchService,
         Timer = _timer
     };
     _model = new TweetHuntViewModel(configuration);
 }
Example #4
0
 public TweetHunt()
 {
     InitializeComponent();
     _model = new TweetHuntViewModel();
 }