Exemplo n.º 1
0
    public static FidoReturnValues LandesklFidoValues(FidoReturnValues lFidoReturnValues, List<string> lHostInfo)
    {

      var lLandeskReturnValues = new LandeskReturnValues();
      for (var i = 0; i < lHostInfo.Count(); i++)
      {
        switch (i)
        {
          case 0:
            lLandeskReturnValues.Hostname = lHostInfo[0] ?? string.Empty;
            break;
          case 1:
            lLandeskReturnValues.Domain = lHostInfo[1] ?? string.Empty;
            break;
          case 2:
            lLandeskReturnValues.LastUpdate = lHostInfo[2] ?? string.Empty;
            break;
          case 3:
            lLandeskReturnValues.Product = lHostInfo[3] ?? string.Empty;
            break;
          case 4:
            lLandeskReturnValues.ProductVersion = lHostInfo[4] ?? string.Empty;
            break;
          case 5:
            lLandeskReturnValues.AgentRunning = lHostInfo[5] ?? string.Empty;
            break;
          case 6:
            lLandeskReturnValues.AutoProtectOn = lHostInfo[6] ?? string.Empty;
            break;
          case 7:
            lLandeskReturnValues.DefInstallDate = lHostInfo[7] ?? string.Empty;
            break;
          case 8:
            lLandeskReturnValues.EngineVersion = lHostInfo[8] ?? string.Empty;
            break;
          case 9:
            lLandeskReturnValues.OSName = lHostInfo[9] ?? string.Empty;
            break;
          case 10:
            lLandeskReturnValues.ComputerIDN = lHostInfo[10] ?? string.Empty;
            break;
          case 11:
            lLandeskReturnValues.Username = lHostInfo[11] ?? string.Empty;
            break;
        }
      }

      lFidoReturnValues.Landesk = lLandeskReturnValues;
      lFidoReturnValues.Hostname = lLandeskReturnValues.Hostname;
      lFidoReturnValues.Username = lLandeskReturnValues.Username;
      return lFidoReturnValues;
    }
Exemplo n.º 2
0
    public static LandeskReturnValues LandeskOsValues(LandeskReturnValues lLandeskReturnValues, List<string> lHostInfo)
    {

      for (var i = 0; i < lHostInfo.Count(); i++)
      {
        switch (i)
        {
          case 0:
            lLandeskReturnValues.OSType = lHostInfo[0];
            break;
          case 1:
            lLandeskReturnValues.Type = lHostInfo[1];
            break;
          case 2:
            lLandeskReturnValues.Battery = lHostInfo[2];
            break;
          case 3:
            lLandeskReturnValues.ChassisType = lHostInfo[3];
            break;
          case 4:
            lLandeskReturnValues.OSVersion = lHostInfo[4];
            break;
          case 5:
            lLandeskReturnValues.OSBuild = lHostInfo[5];
            break;
        }
      }

      return lLandeskReturnValues;
    }
Exemplo n.º 3
0
 private static string NormalizeOSName(LandeskReturnValues lLandeskReturnValues)
 {
   string machineType;
   if (lLandeskReturnValues.OSName.Contains("server"))
   {
     if ((!String.IsNullOrEmpty(lLandeskReturnValues.ChassisType)) && (lLandeskReturnValues.ChassisType != "unknown"))
     {
       machineType = "Windows Server " + lLandeskReturnValues.ChassisType;
     }
     else
     {
       machineType = "Windows Server";
     }
   }
   else
   {
     if ((!String.IsNullOrEmpty(lLandeskReturnValues.ChassisType)) && (lLandeskReturnValues.ChassisType != "unknown"))
     {
       machineType = "Windows " + lLandeskReturnValues.ChassisType;
     }
     else if (lLandeskReturnValues.Battery.ToLower() == "yes")
     {
       machineType = "Windows Laptop/Tablet";
     }
     else
     {
       machineType = "Windows Unknown";
     }
   }
   return machineType;
 }