public Task LoadOptions() { return(Task.Run(() => { _dictOptions = _client.GetDictOptions(_userId); IsDictOptionsLoaded = true; })); }
/// <summary> /// Verifies if there exists a specific command parameter /// </summary> /// <param name="key">name of the parameter to find</param> /// <returns></returns> protected bool HasParameter(string key) { if (DictOptions.ContainsKey(key)) { return(true); } return(false); }
/// <summary> /// Verifies if the command parameters contain a specific key and that it has a value /// </summary> /// <param name="key">the key to verify for existens and value</param> /// <returns></returns> protected bool HasParameterWithValue(string key) { if (DictOptions.ContainsKey(key) && DictOptions.GetValueOrDefault(key) != string.Empty) { return(true); } return(false); }
public DictOptions GetDictOptions(int userId) { var dict = new DictOptions() { AccountNames = _dataAccess.GetAccountNames(userId), Categories = GetCategories(), Currencies = _dataAccess.GetCurrencies(), }; return(dict); }