示例#1
0
 public HomeViewModel(IAnalytics analytics, INavigationService navigationService, IHackerNewsClient hn)
     : base(analytics)
 {
     this.analytics         = analytics;
     this.navigationService = navigationService;
     this.hn = hn;
 }
 public StoriesService(IHackerNewsClient hackerNewsClient, ICacheService cacheService, int topStoriesSize, int cacheTimeInMinutes)
 {
     this.hackerNewsClient   = hackerNewsClient;
     this.cacheService       = cacheService;
     this.topStoriesSize     = topStoriesSize;
     this.cacheTimeInMinutes = cacheTimeInMinutes;
 }
 public HackerController(IHackerNewsClient <Story> storyClient,
                         IHackerNewsClient <Comment> commentClient, ILogger <HackerController> logger)
 {
     this.storyClient   = storyClient;
     this.commentClient = commentClient;
     this.logger        = logger;
 }
示例#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;
        }
 public ArticlesController(ILogger <ArticlesController> logger, IHackerNewsClient client)
 {
     _logger = logger;
     _client = client;
 }
示例#6
0
 public HackerNewsRepository(IHackerNewsClient client, IMemoryCache cache)
 {
     _client = client;
     _cache  = cache;
 }
示例#7
0
 /// <summary>
 /// ValidationController Class
 /// </summary>
 public ValidationController(IHackerNewsClient client)
 {
     Client = client;
 }
 public HackerNewsServiceAgent(IHackerNewsClient hackerNewsClient, IAppConfigurationProvider appConfigurationProvider)
 {
     _hackerNewsClient         = hackerNewsClient;
     _appConfigurationProvider = appConfigurationProvider;
 }
示例#9
0
 public CommentThreadViewModel(IAnalytics analytics, INavigationService navigationService, IHackerNewsClient hn)
     : base(analytics)
 {
     this.navigationService = navigationService;
     this.hn = hn;
 }