Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

DictionarySet Class

DictionarySet is an abstract (MustInherit in Visual Basic) class that supports the creation of new ISet types where the underlying data store is an IDictionary instance.

For a list of all members of this type, see DictionarySet Members .


[Visual Basic]
<Serializable> _
Public MustInherit Class DictionarySet
    Inherits Set
public abstract class DictionarySet : Set

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


You can use any object that implements the IDictionary interface to hold set data. You can define your own, or you can use one of the objects provided in the framework. The type of IDictionary you choose will affect both the performance and the behavior of the ISet using it.

This object overrides the Equals method, but not the GetHashCode method, because the DictionarySet class is mutable. Therefore, it is not safe to use as a key value in a dictionary.

To make a ISet typed based on your own IDictionary, simply derive a new class with a constructor that takes no parameters. Some ISet implmentations cannot be defined with a default constructor. If this is the case for your class, you will need to override clone as well.

It is also standard practice that at least one of your constructors takes an ICollection or an ISet as an argument.


Namespace: Spring.Collections

Assembly: Spring.Core (in Spring.Core.dll)

See Also

DictionarySet Members | Spring.Collections Namespace | ISet