Exemplo n.º 1
0
 /// <summary>
 ///     Add <see cref="GROUP" />s to the lists.
 /// </summary>
 /// <param name="obj">GROUP object to add</param>
 /// <exception cref="ValidationErrorException">thrown if duplicated <see cref="GROUP" /> is found.</exception>
 public void AddElement(GROUP obj)
 {
     try
     {
         Groups.Add(obj.Name, obj);
     }
     catch (ArgumentException)
     {
         throw new ValidationErrorException(string.Format(
                                                "Warning: Duplicate '{0}' (Must be unique of all 'GROUPs' in the MODULE) with name '{1}' found, ignoring",
                                                obj.GetType().Name, obj.Name));
     }
 }