コード例 #1
0
ファイル: ProgramHost.cs プロジェクト: otomarukanta/Norma
        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
ファイル: CommentHost.cs プロジェクト: otomarukanta/Norma
        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();
        }