NamedObjectCollection Class

From RemObjects Software

Jump to: navigation, search

This is a Data Abstract Architecture entry
Feel free to add your notes to this topic below.



Overview (.NET)

Specialized collection class containing named objects that implement the INamedObject Interface.

This class can be used as a quick way to store objects that hold their own name.

Namespace

Declaration (C#)

[XmlSkip("CaseInsensitive"), XmlSkip("Comparer"), XmlSkip("Count")]
public class NamedObjectCollection<TItem> : KeyedCollection<string, TItem>, INameChangeNotification where TItem: class, INamedObject;

Hierarchy

  • KeyedCollection
    • RemObjects.Common.Collections.Collections.NamedObjectCollection

Properties

Property
Type
Description
CaseInsensitive Boolean Returns true if this collection is case in-sensitive.

When this property is true, items with a different case will return the same item, and duplicates with a different case cannot be added.


Methods

Method
Description
Add Creates a new item, adds it to the collection and returns it.

This method uses the Activator class and expects the type passed as a generic type to this class to have an empty constructor for the Compact Framework. Note: On non-Compact Framework it expects the class to have a Name string parameter and an owner parameter of NamedObjectCollection<TItem> type.

FindItem
get_ItemByName
GetNames Returns an array with the names of all items.

This will create a new array, request the names of all elements and return the array.

GetValues Returns an array of all values in this collection.

This method will create a new array containing all the objects in this list and return it.

IndexOfName
NamedObjectCollection Default constructor for NamedObjectCollection.
set_ItemByName


See Also


Product: RemObjects Data Abstract
Current version: Data Abstract 'Vinci' (5.0)

ListsGlossaryFeaturesHow ToDriversComponentsToolsSamplesArticlesArchitectureIssues

Personal tools