当前位置: 首页>>代码示例>>C#>>正文


C# ISessionService.GetSpeakerListAsync方法代码示例

本文整理汇总了C#中ISessionService.GetSpeakerListAsync方法的典型用法代码示例。如果您正苦于以下问题:C# ISessionService.GetSpeakerListAsync方法的具体用法?C# ISessionService.GetSpeakerListAsync怎么用?C# ISessionService.GetSpeakerListAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISessionService的用法示例。


在下文中一共展示了ISessionService.GetSpeakerListAsync方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        public async void Initialize(IServicePool servicePool)
        {
            _sessionService = servicePool.GetService<ISessionService>();

            this.AddCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteAddCommand);
            this.EditCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteEditCommand);
            this.OkCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteOkCommand);
            this.CancelEditCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteCancelEditCommand);
            this.DeleteCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteDeleteCommand);
            this.CancelDeleteCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteCancelDeleteCommand);
            this.IsBusy = true;

            this.Speakers = await _sessionService.GetSpeakerListAsync();
            this.SpeakersView = new ListCollectionView(this.Speakers);
            this.SpeakersView.CurrentChanging += this.OnCurrentSpeakerChanging;
            this.SpeakersView.CurrentChanged += this.OnCurrentSpeakerChanged;
            _editView = this.SpeakersView as IEditableCollectionViewAddNewItem;
            this.OnCurrentSpeakerChanged(null, EventArgs.Empty);

            this.IsBusy = false;
        }
开发者ID:nagyistoce,项目名称:ArchitectureCampSample,代码行数:21,代码来源:SpeakerViewModel.cs

示例2: Initialize

        public async void Initialize(IServicePool servicePool)
        {
            _sessionService = servicePool.GetService<ISessionService>();

            this.AddCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteAddCommand);
            this.EditCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteEditCommand);
            this.OkCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteOkCommand);
            this.CancelEditCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteCancelEditCommand);
            this.DeleteCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteDeleteCommand);
            this.CancelDeleteCommand = new DelegateCommand(p => !this.IsBusy, this.ExecuteCancelDeleteCommand);
            this.IsBusy = true;

            _speakerList = await _sessionService.GetSpeakerListAsync();
            _speakerList.Insert(0, new Speaker { Id = 0, Name = " " });
            this.SpeakersView = new ListCollectionView(_speakerList);

            var trackList = await _sessionService.GetTrackListAsync();
            _uiTrackList = new List<UITrack>();
            foreach (var track in trackList)
            {
                var uiTrack = new UITrack(track);
                _uiTrackList.Add(uiTrack);
                uiTrack.PropertyChanged += this.OnUITrackPropertyChanged;
            }
            this.TracksView = new ListCollectionView(_uiTrackList);

            var sessionTypeList = await _sessionService.GetSessionTypesAsync();
            this.SessionTypesView = new ListCollectionView(sessionTypeList);

            this.Sessions = await _sessionService.GetSessionListAsync();
            this.SessionsView = new ListCollectionView(this.Sessions);
            this.SessionsView.CurrentChanged += this.OnCurrentSessionChanged;
            this.SessionsView.CurrentChanging += this.OnCurrentSessionChanging;
            _editView = this.SessionsView as IEditableCollectionViewAddNewItem;

            if (this.SessionsView.CurrentItem != null)
                this.SetCurrentSession(this.SessionsView.CurrentItem as SessionDto);

            this.IsBusy = false;
        }
开发者ID:nagyistoce,项目名称:ArchitectureCampSample,代码行数:40,代码来源:SessionViewModel.cs


注:本文中的ISessionService.GetSpeakerListAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。