Exemplo n.º 1
0
        public async Task <IEnumerable <TConfig> > GetCollectionConfigAsync <TConfig>(string clientId) where TConfig : class, new()
        {
            var client = await configurationClientService.GetClientOrDefault(clientId);

            var config = await configProvider.GetCollectionAsync <TConfig>(new ConfigurationIdentity(client, registry.GetVersion())).ConfigureAwait(false);

            return(config);
        }
        private async Task <IOptionSet> BuildOptionSetCollection(ConfigurationOptionModel option, IEnumerable <ConfigurationSet> configurationDependencies, ConfigurationIdentity identity)
        {
            var options = await configProvider.GetCollectionAsync(option.Type, identity);

            var optionSet = option.BuildOptionSet(options);

            foreach (var item in optionSet.Values)
            {
                UpdateOptions(item, option.ConfigurationProperties, configurationDependencies, identity);
            }

            return(optionSet);
        }
Exemplo n.º 3
0
        public async Task <IEnumerable <TConfig> > GetCollectionConfigAsync <TConfig>() where TConfig : class, new()
        {
            var config = await configProvider.GetCollectionAsync <TConfig>(applicationId).ConfigureAwait(false);

            return(config);
        }