Beispiel #1
0
 public int getinivalue(string key, string wccpfile)
 {
     var inifile = new IniFile(wccpfile);
     if (inifile.KeyExists("compatability", key))
     {
         string valueinstring = inifile.ReadString("compatability", key);
         int value;
         if (Int32.TryParse(valueinstring, out value))
         {
             l.log(key + "=" + value);
             return value;
         }
         else
         {
             l.log("Invalid wccp file, check wccp.inf");
             Environment.Exit(4);
             return 0;
         }
     }
     else
     {
         if (key == "pluno")
         {
             l.log(key + "=" + 4 + " (Not in WCCP.inf, Default value used)");
             return 4;
         }
         l.log(key + "=" + 0 + " (Not in WCCP.inf, Default value used)");
         return 0;
     }
 }