本文整理汇总了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;
}
示例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;
}