Пример #1
0
        public CreationKitConfigInfo LoadConfig(CreationKitIniLocations inis)
        {
            var configBuilder = new ConfigurationBuilder();

            foreach (var iniPath in inis.RelativeIniPaths)
            {
                configBuilder.AddIniFile(
                    Path.GetFullPath(Path.Combine(
                                         PathUtilities.Normalize(inis.CreationKitInstallPath),
                                         PathUtilities.Normalize(iniPath))),
                    true);
            }

            var configuration     = configBuilder.Build();
            var creationKitConfig = new CreationKitConfig();

            configuration.Bind(creationKitConfig);

            return(new CreationKitConfigInfo()
            {
                CreationKitInstallPath = inis.CreationKitInstallPath,
                Config = creationKitConfig
            });
        }
Пример #2
0
 public CreationKitInisLocator(CreationKitIniLocations locations)
 {
     _locations = locations;
 }