コード例 #1
0
        private async Task <IEnumerable <ConfigurationSet> > GetRequiredConfiguration(ConfigurationModel model, ConfigurationIdentity identity)
        {
            var requiredConfigurationSetTypes = model.GetDependencies()
                                                .Select(s => s.ConfigurationSet)
                                                .Distinct()
                                                .ToArray();
            var configurationSet = new ConfigurationSet[requiredConfigurationSetTypes.Length];
            var i = 0;

            foreach (var type in requiredConfigurationSetTypes)
            {
                configurationSet[i] = await configurationSetService.GetConfigurationSet(type, identity);

                i++;
            }
            return(configurationSet);
        }