/// <summary> /// Добавить новый вирус в таблицу /// </summary> public static void AddNewVirus(VirusInfo info) { VirusesTable_sync.WaitOne(); { VirusesTable.Add(info); } VirusesTable_sync.ReleaseMutex(); }
public static VirusInfo getInfo(int id) { VirusInfo result = null; VirusesTable_sync.WaitOne(); { for (int index = 0; index < VirusesTable.Count; index++) { if (VirusesTable[index].id == id) { result = VirusesTable[index]; break; } } } VirusesTable_sync.ReleaseMutex(); return(result); }