private static string GetConfigString(ConfigKey key) { var value = PcreBuild.GetConfigString(key); if (value == null) { throw new InvalidOperationException("Could not retrieve the configuration property: " + key); } return(value); }
static PcreBuildInfo() { BackslashR = (PcreBackslashR)GetConfigUInt32(ConfigKey.Bsr); Jit = GetConfigBool(ConfigKey.Jit); JitTarget = PcreBuild.GetConfigString(ConfigKey.JitTarget); LinkSize = GetConfigUInt32(ConfigKey.LinkSize); MatchLimit = GetConfigUInt32(ConfigKey.MatchLimit); NewLine = (PcreNewLine)GetConfigUInt32(ConfigKey.NewLine); ParensLimit = GetConfigUInt32(ConfigKey.ParensLimit); RecursionLimit = GetConfigUInt32(ConfigKey.RecursionLimit); StackRecurse = GetConfigBool(ConfigKey.StackRecurse); UnicodeVersion = GetConfigString(ConfigKey.UnicodeVersion); Unicode = GetConfigBool(ConfigKey.Unicode); Version = GetConfigString(ConfigKey.Version); }
private static bool GetConfigBool(ConfigKey key) => PcreBuild.GetConfigUInt32(key).GetValueOrDefault() != 0;