public static bool TryGetBooleanSwitch(string name, out BooleanSwitch bs)
{
Type type = typeof(ProtocolLog);
FieldInfo field = type.GetField(name, BindingFlags.Public | BindingFlags.Static);
if(field == null) {
bs = null;
return false;
}
bs = field.GetValue(null) as BooleanSwitch;
return bs != null;
}
}