Exemplo n.º 1
0
 static PlatformDependent()
 {
     UseDirectBuffer = !SystemPropertyUtil.GetBoolean("io.noPreferDirect", false);
     if (Logger.IsDebugEnabled)
     {
         Logger.DebugFormat("io.noPreferDirect: {0}", !UseDirectBuffer);
     }
 }
Exemplo n.º 2
0
        static ResourceLeakDetector()
        {
            // If new property name is present, use it
            string levelStr = SystemPropertyUtil.Get(PropLevel, DefaultLevel.ToString());

            if (!Enum.TryParse(levelStr, true, out DetectionLevel level))
            {
                level = DefaultLevel;
            }

            TargetRecords = SystemPropertyUtil.GetInt(PropTargetRecords, DefaultTargetRecords);
            Level         = level;

            if (Logger.IsDebugEnabled)
            {
                Logger.DebugFormat("{0}: {1}", PropLevel, level.ToString().ToLower());
                Logger.DebugFormat("{0}: {1}", PropTargetRecords, TargetRecords);
            }
        }