Example #1
0
            public static HardcodedSettings FromIni(IniFile ini)
            {
                const string shooterName     = "Shooter";
                const string framelessPrefix = "Frameless_";

                var shooterSection = ini[shooterName];

                var frameSections = ini.Keys.Where(k => k.StartsWith(framelessPrefix, StringComparison.OrdinalIgnoreCase))
                                    .Select(k => ini[k]);

                return(new HardcodedSettings(
                           ShooterConfig.FromIni(shooterSection),
                           frameSections.Select(FrameConfig.FromIni).ToArray()
                           ));
            }
Example #2
0
 public HardcodedSettings(ShooterConfig shooterConfig, FrameConfig[] frameConfigs)
 {
     _shooterConfig = shooterConfig;
     _frameConfigs  = frameConfigs;
 }