Exemplo n.º 1
0
 public HomeViewModel(IAnalytics analytics, INavigationService navigationService, IHackerNewsClient hn)
     : base(analytics)
 {
     this.analytics         = analytics;
     this.navigationService = navigationService;
     this.hn = hn;
 }
Exemplo n.º 2
0
 public StoriesService(IHackerNewsClient hackerNewsClient, ICacheService cacheService, int topStoriesSize, int cacheTimeInMinutes)
 {
     this.hackerNewsClient   = hackerNewsClient;
     this.cacheService       = cacheService;
     this.topStoriesSize     = topStoriesSize;
     this.cacheTimeInMinutes = cacheTimeInMinutes;
 }
Exemplo n.º 3
0
 public HackerController(IHackerNewsClient <Story> storyClient,
                         IHackerNewsClient <Comment> commentClient, ILogger <HackerController> logger)
 {
     this.storyClient   = storyClient;
     this.commentClient = commentClient;
     this.logger        = logger;
 }
Exemplo n.º 4
0
        public MainViewModel(IHackerNewsClient client)
        {
            MVVM.WebBrowserHelper.SetBrowserEmulationMode(11001);
            _client = client;
            Items   = new BindingList <Item>();

            LoadHeadlinesCommand = new RelayCommand(async() => await LoadItems(_client.GetTopItems), () => AllowLoadingItems);
            LoadIncomingCommand  = new RelayCommand(async() => await LoadItems(_client.GetIncomingItems), () => AllowLoadingItems);
            LoadPopularCommand   = new RelayCommand(async() => await LoadItems(_client.GetPopularItems), () => AllowLoadingItems);

            TopLevelComments      = new BindingList <Item>();
            this.PropertyChanged += MainViewModel_PropertyChanged;
        }
Exemplo n.º 5
0
 public ArticlesController(ILogger <ArticlesController> logger, IHackerNewsClient client)
 {
     _logger = logger;
     _client = client;
 }
Exemplo n.º 6
0
 public HackerNewsRepository(IHackerNewsClient client, IMemoryCache cache)
 {
     _client = client;
     _cache  = cache;
 }
Exemplo n.º 7
0
 /// <summary>
 /// ValidationController Class
 /// </summary>
 public ValidationController(IHackerNewsClient client)
 {
     Client = client;
 }
 public HackerNewsServiceAgent(IHackerNewsClient hackerNewsClient, IAppConfigurationProvider appConfigurationProvider)
 {
     _hackerNewsClient         = hackerNewsClient;
     _appConfigurationProvider = appConfigurationProvider;
 }
Exemplo n.º 9
0
 public CommentThreadViewModel(IAnalytics analytics, INavigationService navigationService, IHackerNewsClient hn)
     : base(analytics)
 {
     this.navigationService = navigationService;
     this.hn = hn;
 }