Пример #1
0
        public ProgramHost(AbemaState abemaState, StatusService statusService)
        {
            Casts = new ObservableCollection <string>();
            Crews = new ObservableCollection <string>();
            _compositeDisposable = new CompositeDisposable();

            _abemaState    = abemaState;
            _statusService = statusService;
            _compositeDisposable.Add(abemaState.ObserveProperty(w => w.CurrentEpisode)
                                     .Subscribe(w => FetchProgramInfo()));
            FetchProgramInfo(); // Init
        }
Пример #2
0
        public CommentHost(AbemaApiClient abemaApiHost, AbemaState abemaState, Configuration configuration,
                           StatusService statusService)
        {
            Comments             = new ObservableCollection <Comment>();
            _compositeDisposable = new CompositeDisposable();

            _abemaApiHost  = abemaApiHost;
            _abemaState    = abemaState;
            _configuration = configuration;
            _statusService = statusService;
            _compositeDisposable.Add(_abemaState.ObserveProperty(w => w.CurrentSlot).Subscribe(w => ReloadComments()));
            ReloadComments();
        }