private static IDependencyConfig InitializeContainer(ExtensionConfigContext context)
        {
            var configType = context.Config.TypeLocator.GetTypes()
                             .Where(x => typeof(IDependencyConfig).IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract)
                             .FirstOrDefault();

            IDependencyConfig dependencyConfig = null;

            if (configType != null)
            {
                var configInstance = Activator.CreateInstance(configType);
                dependencyConfig = (IDependencyConfig)configInstance;
            }
            return(dependencyConfig);
        }
Example #2
0
 public void TestInitialize() => _dependencyConfig = new DependencyConfig();
Example #3
0
 public DependencyInjection(IDependencyConfig config)
 {
     _config = config;
 }
 public DependencyProvider(IDependencyConfig dependencyConfig)
 {
     _dependencyConfig     = dependencyConfig;
     _recursionExcludTypes = new ConcurrentDictionary <int, Stack <Type> >();
 }