Example #1
0
        protected static void LoadModuleConfig(IDependencyContainer container, string configPath = null)
        {
            var assembly = Assembly.GetCallingAssembly();

            configPath = configPath ?? _defaultConfigResourceName;
            configPath = $"{assembly.GetName().Name}.{configPath}";

            using (var resourceStream = assembly.GetManifestResourceStream(configPath))
            {
                if (resourceStream != null)
                {
                    container.LoadModuleConfig(resourceStream);
                }
            }
        }