Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/17/10 02:38:32 (14 years ago)
Author:
swagner
Message:

Implemented reviewers' comments (#863)

  • adapted item names of generic items to reflect the type of their generic parameters
Location:
trunk/sources/HeuristicLab.Core/3.3
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs

    r3728 r3822  
    5050    public static string GetName(Type type) {
    5151      object[] attribs = type.GetCustomAttributes(typeof(ItemAttribute), false);
    52       if (attribs.Length > 0) return ((ItemAttribute)attribs[0]).Name;
    53       else return type.GetPrettyName();
     52      if (attribs.Length > 0) {
     53        string name = ((ItemAttribute)attribs[0]).Name;
     54        if (type.IsGenericType) {
     55          name += "<";
     56          Type[] typeParams = type.GetGenericArguments();
     57          if (typeParams.Length > 0) {
     58            name += GetName(typeParams[0]);
     59            for (int i = 1; i < typeParams.Length; i++)
     60              name += ", " + GetName(typeParams[i]);
     61          }
     62          name += ">";
     63        }
     64        return name;
     65      } else {
     66        return type.GetPrettyName();
     67      }
    5468    }
    5569    public static string GetDescription(Type type) {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs

    r3798 r3822  
    3535  /// <typeparam name="T">The element type (base type IItem)</typeparam>
    3636  [StorableClass]
    37   [Item("CheckedItemCollection<T>", "Represents a collection of items that can be checked or unchecked.")]
     37  [Item("CheckedItemCollection", "Represents a collection of items that can be checked or unchecked.")]
    3838  public class CheckedItemCollection<T> : ItemCollection<T>, ICheckedItemCollection<T> where T : class, IItem {
    3939    [Storable]
  • trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs

    r3798 r3822  
    3838  /// <typeparam name="T">The element type (base type is IItem)</typeparam>
    3939  [StorableClass]
    40   [Item("CheckedItemList<T>", "Represents a list of items that can be checked or unchecked.")]
     40  [Item("CheckedItemList", "Represents a list of items that can be checked or unchecked.")]
    4141  public class CheckedItemList<T> : ItemList<T>, ICheckedItemList<T> where T : class, IItem {
    4242    [Storable]
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs

    r3728 r3822  
    3434namespace HeuristicLab.Core {
    3535  [StorableClass]
    36   [Item("ItemArray<T>", "Represents an array of items.")]
     36  [Item("ItemArray", "Represents an array of items.")]
    3737  public class ItemArray<T> : ObservableArray<T>, IItemArray<T> where T : class, IItem {
    3838    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemCollection.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ItemCollection<T>", "Represents a collection of items.")]
     33  [Item("ItemCollection", "Represents a collection of items.")]
    3434  public class ItemCollection<T> : ObservableCollection<T>, IItemCollection<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ItemDictionary<TKey, TValue>", "Represents a dictionary of items.")]
     33  [Item("ItemDictionary", "Represents a dictionary of items.")]
    3434  public class ItemDictionary<TKey, TValue> : ObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs

    r3728 r3822  
    3434namespace HeuristicLab.Core {
    3535  [StorableClass]
    36   [Item("ItemList<T>", "Represents a list of items.")]
     36  [Item("ItemList", "Represents a list of items.")]
    3737  public class ItemList<T> : ObservableList<T>, IItemList<T> where T : class, IItem {
    3838    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs

    r3728 r3822  
    3434namespace HeuristicLab.Core {
    3535  [StorableClass]
    36   [Item("ItemSet<T>", "Represents a set of items.")]
     36  [Item("ItemSet", "Represents a set of items.")]
    3737  public class ItemSet<T> : ObservableSet<T>, IItemSet<T> where T : class, IItem {
    3838    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs

    r3728 r3822  
    2929
    3030namespace HeuristicLab.Core {
    31   [Item("KeyedItemCollection<TKey, TItem>", "Represents a keyed collection of items.")]
     31  [Item("KeyedItemCollection", "Represents a keyed collection of items.")]
    3232  [StorableClass]
    3333  public abstract class KeyedItemCollection<TKey, TItem> : ObservableKeyedCollection<TKey, TItem>, IKeyedItemCollection<TKey, TItem> where TItem : class, IItem {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/NamedItemCollection.cs

    r3560 r3822  
    2929
    3030namespace HeuristicLab.Core {
    31   [Item("NamedItemCollection<T>", "Represents a collection of named items.")]
     31  [Item("NamedItemCollection", "Represents a collection of named items.")]
    3232  [StorableClass]
    3333  public class NamedItemCollection<T> : KeyedItemCollection<string, T> where T : class, INamedItem {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemCollection.cs

    r3628 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyCheckedItemCollection<T>", "Represents a read-only collection of checked items.")]
     33  [Item("ReadOnlyCheckedItemCollection", "Represents a read-only collection of checked items.")]
    3434  public class ReadOnlyCheckedItemCollection<T> : ReadOnlyItemCollection<T>, ICheckedItemCollection<T> where T : class, IItem {
    3535    private CheckedItemCollection<T> CheckedItemCollection {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemList.cs

    r3628 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyCheckedItemList<T>", "Represents a read-only list of checked items.")]
     33  [Item("ReadOnlyCheckedItemList", "Represents a read-only list of checked items.")]
    3434  public class ReadOnlyCheckedItemList<T> : ReadOnlyItemList<T>, ICheckedItemList<T> where T : class, IItem {
    3535    private CheckedItemList<T> CheckedItemList {
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemArray<T>", "Represents a read-only array of items.")]
     33  [Item("ReadOnlyItemArray", "Represents a read-only array of items.")]
    3434  public class ReadOnlyItemArray<T> : ReadOnlyObservableArray<T>, IItemArray<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemCollection<T>", "Represents a read-only collection of items.")]
     33  [Item("ReadOnlyItemCollection", "Represents a read-only collection of items.")]
    3434  public class ReadOnlyItemCollection<T> : ReadOnlyObservableCollection<T>, IItemCollection<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemDictionary<TKey, TValue>", "Represents a read-only dictionary of items.")]
     33  [Item("ReadOnlyItemDictionary", "Represents a read-only dictionary of items.")]
    3434  public class ReadOnlyItemDictionary<TKey, TValue> : ReadOnlyObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemList<T>", "Represents a read-only list of items.")]
     33  [Item("ReadOnlyItemList", "Represents a read-only list of items.")]
    3434  public class ReadOnlyItemList<T> : ReadOnlyObservableList<T>, IItemList<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyItemSet<T>", "Represents a read-only set of items.")]
     33  [Item("ReadOnlyItemSet", "Represents a read-only set of items.")]
    3434  public class ReadOnlyItemSet<T> : ReadOnlyObservableSet<T>, IItemSet<T> where T : class, IItem {
    3535    private string filename;
  • trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs

    r3728 r3822  
    3131namespace HeuristicLab.Core {
    3232  [StorableClass]
    33   [Item("ReadOnlyKeyedItemCollection<TKey, TItem>", "Represents a read-only keyed collection of items.")]
     33  [Item("ReadOnlyKeyedItemCollection", "Represents a read-only keyed collection of items.")]
    3434  public class ReadOnlyKeyedItemCollection<TKey, TItem> : ReadOnlyObservableKeyedCollection<TKey, TItem>, IKeyedItemCollection<TKey, TItem> where TItem : class, IItem {
    3535    private string filename;
Note: See TracChangeset for help on using the changeset viewer.