private int GetFreeIdUp(int id) { int result = id; if (_threatModel.GetSeverity(id) != null) { if (id == (int)DefaultSeverity.Critical) { result = (int)DefaultSeverity.Unknown; } else { result = GetFreeIdUp(id + 1); } } return(result); }