The CsoGateway.Collections namespace contains cso-native classes and interfaces that implements many of the most common abstract data types. For ease of use, their public interface is similar to their equivalent in the .NET Framework. Often, the type of the parameters passed to methods is asserted, making it easy to troubleshoot problems.

Classes

- Class Description
Class
CsoGateway.Collections.Dictionary An implementation of the Dictionary abstract data type. The underlying data structure used is a hashtable using as linked list for collision resolution. It's interface is meant to resemble that of the .NET class System.Collections.Generic..::.Dictionary<(Of <(TKey, TValue>)>)
Class
CsoGateway.Collections.Bucket A linked list holding the key/value pairs for the CsoGateway.Collections.Dictionary class.
Class
CsoGateway.Collections.Entry A structure used to stored to key/value pair of a CsoGateway.Collections.Dictionary. Since the Dictionary is using a chained list to workaround collision, there is a next variable in Entry to hold a reference to the next element in the chained list.
Class
CsoGateway.Collections.List A collection of ordered objects that can be accessed by index. It's interface is meant to resemble that of the .NET class System.Collections.Generic..::.List<(Of <(T>)>). It's internal implementation is a simple javascript Array object.
Class
CsoGateway.Collections.Queue Implements the common queue abstract data type. It's interface is meant to resemble that of the .NET class System.Collections.Generic..::.Queue<(Of <(T>)>). It's internal implementation is a CsoGateway.Collections.List.
Class
CsoGateway.Collections.Stack Implements the common stack abstract data type. It's interface is meant to resemble that of the .NET class System.Collections.Generic..::.Stack<(Of <(T>)>). It's internal implementation is a CsoGateway.Collections.List.
Class
CsoGateway.Collections.SortedList CsoGateway.Collections.SortedList is a collection of key/pair values that are sorted by key. It's interface is meant to resemble that of the .NET class System.Collections.Generic..::.SortedList<(Of <(TKey, TValue>)>)
Class
CsoGateway.Collections.NameValueCollection CsoGateway.Collections.NameValueCollection represents a collection of associated String keys and String values that can be accessed either with the key or with the index. It's interface is meant to resemble that of the .NET class System.Collections.Specialized..::.NameValueCollection. It's internal implementation is a CsoGateway.Collections.Dictionary. It differs from a CsoGateway.Collections.Dictionary in the following ways:
  • Many valus can be associated with a key
  • Keys and values can be of type String only
  • null is accepted as a value for the key
static
Class
CsoGateway.Collections.Hashing CsoGateway.Collections.Hashing is a static class. It contains static utility methods that calculates hash codes. Methods in this class are not in the prototype. They can be called without creating an object with the new operator.

Interfaces

- Interface Description
Interface
CsoGateway.Collections.ICsoHashProvider Defines an interface to expose a custom hashing source. When a class implements this interface, the method CsoGateway.Collections.Hashing.Hash will use the objects returned by the method getCsoHashSource() to calculated the hash code.