public ConfigurationContainer(IEnumerable <IRoutineConfigurationRecord <TSerialized> > routineConfigurationRecords, IGWithConstructorFactory <TSerialized> deserializer, MemberTag memberTag, string @for) { this.deserializer = deserializer; var memberRoutineConfigurationRecords = routineConfigurationRecords.LimitRoutineConfigurationRecords(memberTag); foreach (var routineConfigurationRecord in memberRoutineConfigurationRecords) { if (routineConfigurationRecord.For.IsNullOrWhiteSpaceOrAsterix() || routineConfigurationRecord.For == @for) { foreach (var resolvableConfigurationRecord in routineConfigurationRecord.Resolvables) { if (!elements.Any(e => e.Type == resolvableConfigurationRecord.Type && e.Namespace == resolvableConfigurationRecord.Namespace)) { elements.Add(resolvableConfigurationRecord); } } } } }
/// <summary> /// /// </summary> /// <param name="configurationManagerLoader">Abstraction over .NET Classic and .NET Core configuration methods</param> public ConfigurationContainerFactory(IConfigurationManagerLoader <TSerialized> configurationManagerLoader, IGWithConstructorFactory <TSerialized> deserializer) { this.configurationManagerLoader = configurationManagerLoader; this.deserializer = deserializer; }