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() )); }
public HardcodedSettings(ShooterConfig shooterConfig, FrameConfig[] frameConfigs) { _shooterConfig = shooterConfig; _frameConfigs = frameConfigs; }