Exemplo n.º 1
0
        public NewsPageViewModel(KeyakiNewsListUseCase keyakiNewsListUseCase)
        {
            _keyakiNewsListUseCase = keyakiNewsListUseCase;

            NewsDatas = _keyakiNewsListUseCase.NewsDatas;

            _keyakiNewsListUseCase.FetchNewsDatasAsync();
        }
        public KEYAKINewsPageViewModel(KeyakiNewsListUseCase keyakiNewsListUseCase)
        {
            // Receive Instance from DI
            KeyakiNewsListUseCase = keyakiNewsListUseCase;

            // Binding ReactiveCollection
            NewsDatas = KeyakiNewsListUseCase.NewsDatas;

            // Call Use Case Method
            KeyakiNewsListUseCase.FetchNewsDatasAsync();

            NewsTappedEvent
            .Where(o => NewsDatas.Count != 0)
            .Where(o => o != null)
            .Subscribe(o => Device.OpenUri(new Uri(o.Link)));
        }
Exemplo n.º 3
0
 public MainPageViewModel(KeyakiNewsListUseCase keyakiNewsListUseCase)
 {
 }