Brunet.Applications.LogManager.TryGetBooleanSwitch C# (CSharp) Метод

TryGetBooleanSwitch() публичный статический Метод

public static TryGetBooleanSwitch ( string name, BooleanSwitch &bs ) : bool
name string
bs System.Diagnostics.BooleanSwitch
Результат bool
    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;
    }
  }