public MessageModel(string text, string month, string url, IApiLogs apiLogs) { _apiLogs = apiLogs; Text = text; Month = month; Url = url; }
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 StalkSingleViewModel(IApiLogs apiLogs, IApiChannels apiChannels, CurrentState currentState) { _apiLogs = apiLogs; _apiChannels = apiChannels; _currentState = currentState; SubmitCommand = new ActionCommand(async() => await GetMessages()); NextMonthCommand = new ActionCommand(NextMonth); PrevMonthCommand = new ActionCommand(PrevMonth); GetLogCommand = new ActionCommand(async l => await GetLog((MessageModel)l)); if (_currentState.Channels == null) { Channels = new ObservableCollection <string>(); GetChannel().ConfigureAwait(false); return; } Channels = new ObservableCollection <string>(); _currentState.Channels.ForEach(c => Channels.Add(c.Name)); }
public StalkMultiViewModel(IApiLogs apiLogs, IApiChannels apiChannels, CurrentState currentState) { _apiLogs = apiLogs; _apiChannels = apiChannels; _currentState = currentState; AddUserCommand = new ActionCommand(async() => await AddUser()); RemoveUserCommand = new ActionCommand(u => RenoveUser((MultiViewUserModel)u)); GetLogCommand = new ActionCommand(async l => { var user = (MultiViewUserModel)l; await GetLog(user.SelectedMonth, user.SearchText); }); Users = new ObservableCollection <IMultiViewUserModel>(); LoadUsers(); if (_currentState.Channels == null) { Channels = new ObservableCollection <string>(); GetChannel().ConfigureAwait(false); return; } Channels = new ObservableCollection <string>(); _currentState.Channels.ForEach(c => Channels.Add(c.Name)); }
public CurrentState(IApiLogs apiLogs, Action <string> snackbarMessageQueue) { _apiLogs = apiLogs; _snackbarMessageQueue = snackbarMessageQueue; }