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 MonthsViewModel(IApiMonths apiMonths, Action <string, string> changeTitle, CurrentState currentState) { RefreshMonthCommand = new ActionCommand(async() => await GetMonths()); SwitchToDaysCommand = new ActionCommand(m => _currentState.SwitchViewToDays((MonthModel)m)); _apiMonths = apiMonths; _currentState = currentState; changeTitle(_currentState.Channel.Name, null); if (_currentState.Channel.Months != null) { MonthsList = _currentState.Channel.Months; return; } GetMonths().ConfigureAwait(false); }
public ApiLogs(IApiMonths apiMonths, Action <string> snackbarMessageQueue) { _apiMonths = apiMonths; _snackbarMessageQueue = snackbarMessageQueue; if (_httpClient == null) { _httpClient = new HttpClient { Timeout = TimeSpan.FromMinutes(1), DefaultRequestHeaders = { UserAgent = { ProductInfoHeaderValue.Parse("Overrustlelogs-Desktop") } } }; } }