예제 #1
0
        public WatchListViewModel(IWatchListService watchListService, IMarketFeedService marketFeedService, IRegionManager regionManager, IEventAggregator eventAggregator)
        {
            if (watchListService == null)
            {
                throw new ArgumentNullException("watchListService");
            }

            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }

            this.HeaderInfo = Resources.WatchListTitle;
            this.WatchListItems = new ObservableCollection<WatchItem>();

            this.marketFeedService = marketFeedService;
            this.regionManager = regionManager;

            this.watchList = watchListService.RetrieveWatchList();
            this.watchList.CollectionChanged += delegate { this.PopulateWatchItemsList(this.watchList); };
            this.PopulateWatchItemsList(this.watchList);

            this.eventAggregator = eventAggregator;
            this.eventAggregator.GetEvent<MarketPricesUpdatedEvent>().Subscribe(this.MarketPricesUpdated, ThreadOption.UIThread);

            this.removeWatchCommand = new DelegateCommand<string>(this.RemoveWatch);

            this.watchListItems.CollectionChanged += this.WatchListItems_CollectionChanged;
        }       
예제 #2
0
 public AddWatchViewModel(IWatchListService watchListService)
 {
     if (watchListService == null)
     {
         throw new ArgumentNullException("service");
     }
     this.watchListService = watchListService;
 }
예제 #3
0
 public AddWatchPresenter(IAddWatchView view, IWatchListService service)
 {
     View = view;
     View.SetAddWatchCommand(service.AddWatchCommand);
 }
예제 #4
0
 public WatchListsController(IWatchListService watchListService)
 {
     _watchListService = watchListService;
 }
예제 #5
0
 public AddWatchPresenter(IAddWatchView view, IWatchListService service)
 {
     View = view;
     View.SetAddWatchCommand(service.AddWatchCommand);
 }
예제 #6
0
 //Default Constructor
 public WatchListController(IWatchListService WatchListService, IOrderWatchList OrderWatchList, IRepo <Customer> Customers)
 {
     this.watchListService      = WatchListService;
     this.orderWatchListService = OrderWatchList;
     this.customers             = Customers;
 }
예제 #7
0
 public AccountService(IRepository <Account> repository, IWatchListService watchListService)
 {
     _repository       = repository;
     _watchListService = watchListService;
 }
예제 #8
0
 public AddWatchViewModel(IWatchListService watchListService)
 {
     this.watchListService = watchListService ?? throw new ArgumentNullException("watchListService");
 }
예제 #9
0
 public NewsController(IInvestagramsApiCachedService investagramsApi, IWatchListService watchListService)
 {
     _investagramsApi  = investagramsApi;
     _watchListService = watchListService;
 }