protected virtual async Task <Dictionary <string, string> > GetOrNullValueFromProvidersAsync( IEnumerable <IAppValueProvider> providers, AppDefinition app) { foreach (var provider in providers) { var value = await provider.GetOrNullAsync(app); if (value != null) { return(value); } } return(null); }
public virtual Task <Dictionary <string, string> > GetOrNullAsync(AppDefinition setting) { var result = new Dictionary <string, string>(); var section = Configuration.GetSection(ConfigurationNamePrefix + setting.Name).GetChildren(); if (section == null || !section.Any()) { return(Task.FromResult <Dictionary <string, string> >(null)); } foreach (var v in section) { result[v.Key] = v.Value; } return(Task.FromResult(result)); }
public abstract Task <Dictionary <string, string> > GetOrNullAsync(AppDefinition app);
public override async Task <Dictionary <string, string> > GetOrNullAsync(AppDefinition setting) { return(await AppStore.GetOrNullAsync(setting.Name, Name, CurrentTenant.Id?.ToString())); }
public override Task <Dictionary <string, string> > GetOrNullAsync(AppDefinition app) { return(Task.FromResult(app.DefaultValues)); }
public override Task <Dictionary <string, string> > GetOrNullAsync(AppDefinition setting) { return(AppStore.GetOrNullAsync(setting.Name, Name, null)); }