private string?ValueFromIndex(int index, IReadOnlyDictionary <string, string> properties) { if (Keys.Count <= index) { return(null); } return(ApplicationProperty.ReadValue(Keys[index], properties)); }
public List <ExchangeSettings> Load(IReadOnlyDictionary <string, string> properties) { if (_allExchangeParameters != null && _allExchangeParameters.Count == 0) { var exchangeParameters = ApplicationProperty.ReadMultipleValues(_exchangeNames, ";", properties).Select(x => new ExchangeSettings(_exchangeName, properties)); _allExchangeParameters.AddRange(exchangeParameters); } return(_allExchangeParameters ?? new List <ExchangeSettings>()); }
public async Task SetApplicationProperty(string property, string value, CancellationToken cancellationToken) { var applicationProperty = await this.GetItemAsync <ApplicationProperty>(property, cancellationToken); if (applicationProperty == null) { applicationProperty = new ApplicationProperty { Property = property, }; } applicationProperty.Value = value; await this.SaveItemAsync(applicationProperty, cancellationToken); }
set => SetValue(ApplicationProperty, value);
private List <ExchangeSettingsItem> RetrieveParameters(IReadOnlyDictionary <string, string> properties) => _keys.Select(key => new ExchangeSettingsItem(key, ApplicationProperty.ReadValue(key, properties) ?? string.Empty)).ToList();