public ApiFactory(IApiChannels apiChannels, IApiMonths apiMonths, IApiDays apiDays, IApiLogs apiLogs, IApiUserlogs apiUserlogs, IApiMentions apiMentions) { _apiChannels = apiChannels; _apiMonths = apiMonths; _apiDays = apiDays; _apiLogs = apiLogs; _apiUserlogs = apiUserlogs; _apiMentions = apiMentions; }
public MentionsViewModel(IApiChannels apiChannels, IApiMentions apiMentions, CurrentState currentState) { _apiChannels = apiChannels; _apiMentions = apiMentions; _currentState = currentState; SubmitCommand = new ActionCommand(async() => await GetMessages()); SelectedDate = DateTime.Now; if (_currentState.Channels == null) { Channels = new ObservableCollection <string>(); GetChannel().ConfigureAwait(false); return; } Channels = new ObservableCollection <string>(); _currentState.Channels.ForEach(c => Channels.Add(c.Name)); }