DVTk API
DvtkData.Collections Namespace
DVTkDvtkData.Collections
DVTk API

[This is preliminary documentation and is subject to change.]

In many cases we might like to extend the collection classes provided by the framework. Maybe we need to ensure that only objects of certain types are stored in the collection or we need a different sorting algorithm. Either way, custom collection classes will de-/serialize properly as long as they implement IEnumerable or ICollection and, of course, we supply enough information about the types stored inside the collection. Keep in mind that only the items that can be accessed through the interfaces are serialized, public properties and fields are not, unless they return a class that itself implements ICollection. There is another caveat when you implement your own container classes: The implementation of the XmlSerializer requires the collection to have a default accessor, even though ICollection does not require it. In VB.Net a default accessor is implemented as an Item property with a single parameter of type Integer. In C# it is implemented as an indexer. The syntax for an indexer resembles a read-only property, but it uses the square brackets around the parameter.
These collection classes are internally used by the component.
In .Net 2.x (Whidbey) the System.Collections namespace will support templated strong-typed collections. We may improve this part of the component to use that mechanism.
Declaration Syntax
C#Visual BasicVisual C++
namespace DvtkData.Collections
Namespace DvtkData.Collections
namespace DvtkData.Collections
Types
All TypesClasses
IconTypeDescription
DoubleCollection
Type safe DoubleCollection

Int16Collection
Type safe Int16Collection

Int32Collection
Type safe Int32Collection

NullSafeCollectionBase
A null-safe collection. This class is meant to be extended by a type-safe collection classess.

SingleCollection
Type safe SingleCollection

StringCollection
Type safe StringCollection

TagCollection
Type safe TagCollection

UInt16Collection
Type safe UInt16Collection

UInt32Collection
Type safe UInt32Collection