Ejemplo n.º 1
0
 private void addConfigurationFromIncludeNodes(List <ConfigurationParser> list)
 {
     foreach (ConfigurationParser parser in list.ToArray())
     {
         parser.ForEachFile(_log, filename => _log.Try(() =>
         {
             ConfigurationParser childParser = ConfigurationParser.FromFile(filename);
             list.Add(childParser);
         })
                            .AndReportErrorAs(150, filename));
     }
 }
Ejemplo n.º 2
0
 private void addConfigurationFromExplicitlyAddedFiles(ICollection <ConfigurationParser> list)
 {
     foreach (string filename in _otherFiles)
     {
         string absolutePath = locateFileAsAbsolutePath(filename);
         _log.Try(() =>
         {
             ConfigurationParser parser = ConfigurationParser.FromFile(absolutePath);
             parser.Description         = absolutePath;
             list.Add(parser);
         }).AndReportErrorAs(160, absolutePath);
     }
 }
Ejemplo n.º 3
0
        private void addConfigurationFromStructureMapConfig(ICollection <ConfigurationParser> list)
        {
            if (_ignoreDefaultFile)
            {
                return;
            }
            // Pick up the configuration in the default StructureMap.config
            string pathToStructureMapConfig = GetStructureMapConfigurationPath();

            if ((_useAndEnforceExistenceOfDefaultFile || File.Exists(pathToStructureMapConfig)))
            {
                _log.Try(() =>
                {
                    ConfigurationParser parser = ConfigurationParser.FromFile(pathToStructureMapConfig);
                    list.Add(parser);
                }).AndReportErrorAs(100, pathToStructureMapConfig);
            }
        }