Ejemplo n.º 1
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;            
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 public TweetHunt()
 {
     InitializeComponent();
     _model = new TweetHuntViewModel();
 }