Site Contents

Intro & News

Development

Miscellaneous

Projects


Collection Templates

This page contains C# collection templates for CodeSmith by Eric J. Smith, a commercial template expansion utility that provides generic programming for the .NET Framework. Note that I never use the CodeSmith plug-in for Visual Studio .NET so I don’t know if or how my templates will cooperate with it. They work well with the stand-alone CodeSmith executables, however.

All templates and their documentation are © 2003–2004 by Christoph Nahr, except as otherwise noted. They are available for free download and no restrictions are placed on their use or redistribution, except that my copyright notice should be left intact and any changes to the original distribution should be documented.

Important Note: As of 30 October 2005, the entire functionality of the Collection Templates has been added to the Tektosyne library (version 3.0.0 or later) in the form of generic collection classes. The Collection Templates are therefore discontinued. Anyone is welcome to take up their maintenance.

System Requirements

CodeSmith 2.5 (build 2.5.10 or later) is required to perform the template expansion, and CodeSmith in turn requires a Microsoft Windows system capable of running the Microsoft .NET Framework 1.1. This includes most Windows systems with Internet Explorer 5.01 and a Pentium class CPU, except for the unsupported Windows 95 and NT 3.x. To write programs that use the generated C# source code, you also need either Microsoft Visual Studio .NET 2003 or the free Microsoft .NET Framework 1.1 SDK (106 MB).

Version History

The page Template News details the changes in the latest versions of the template packages. The current version of the Collection Templates package is 2.0.0, released on 12 July 2004.

Attention: The current release does not support synchronized (thread-safe) wrappers. Download release 1.6.0 if you need those wrappers.

Download Files

The current template package is Collections.zip (64.6 KB). This is a standard ZIP archive containing long file names.

The Collection Templates should perform at least as well as the standard collection classes. Benchmarking showed a speedup of up to 1,600% for the ArrayList template. Please refer to the included ReadMe file for details.

Test Package

If you are interested in designing your own collection templates, you might want to download the complete unit test and benchmark package, CollectionsTest.zip (227 KB).

Additionally, the archive contains the XML property files for all test collections and for all Hexkit and Tektosyne collections; a small C# script that recreates all collections from these XML property files; and a NAnt build file that recreates the distribution packages.

Note: The test package requires an obsolete version of my Tektosyne library, and will therefore not compile. You must change or remove all references to that library.

Release 1.6.0

As stated above, the Collection Templates no longer support synchronized (thread-safe) wrappers. However, you may still download release 1.6.0 which was the last version to support these wrappers.

Note: The test package requires an obsolete version of my Tektosyne library, and will therefore not compile. You must change or remove all references to that library.


This page was last updated on 30 October 2005.
Current version available at http://www.kynosarges.de