Exemplo n.º 1
0
 /// <summary>
 /// Return (any) OS Instance which we can find for the specified asset
 /// </summary>
 /// <param name="assetID"></param>
 /// <returns></returns>
 public OSInstance GetInstanceForAsset(int assetID)
 {
     foreach (InstalledOS installedOS in this)
     {
         OSInstance foundInstance = installedOS.GetInstanceForAsset(assetID);
         if (foundInstance != null)
         {
             return(foundInstance);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Load instances of this Operating System from the supplied DataTable
 /// </summary>
 /// <param name="instancesTable"></param>
 protected void LoadInstances(DataTable instancesTable)
 {
     _listInstances.Clear();
     foreach (DataRow row in instancesTable.Rows)
     {
         try
         {
             OSInstance newInstance = new OSInstance(row);
             _listInstances.Add(newInstance);
         }
         catch (Exception)
         {
             // Just skip the instance as this points to an internal database consistency error
         }
     }
 }