This project is read-only.
Project Description
The .NET Extension Library adds common functionality to .NET's system libraries. Most new features are added to existing types via extension methods. The rest of the features are either new classes or improvements to existing classes (such as the introduction of an ICache interface for greater abstraction).

The goal is to provide a standard set of useful functionality to your existing toolset.

Here's a brief example that demonstrates 2 extensions, as well as the improved cache API:
User user = CacheFactory.GetInstance.Fetch("user.{0}".Sub(userId), () => _dataStore.GetUser(userId), 3.DaysFromNow());

1 - CacheFactory returns an instance of ICache, which helps decouple your code from the underlying caching implementation (it currently returns an HttpRuntime.Cache object)
2 - Fetch is a mix between Get and Insert - if Get returns null, the Func<T> callback is invoked, stored and returned
3 - The string.Sub() extension method is a short alias to string.Format
4 - int.DaysFromNow() is one of many neat integer extension methods that make it easier to deal with dates

The best way to contribute is to submit your own extensions to the project. You can do so by opening an Issue and providing the extension code (and ideally accompanying nunit tests). The exact process for new extensions to be accepted isn't particularly well-defined. We'll likely use a mix of popularity (vote for extensions you want to see implemented) as well as common sense. As a general guide, we are seeking extensions that are simple and useful beyond some edge case.

Early Beta Warning
The library is in a very early beta. The code is very simple, and relatively well covered by equally simple tests; however, none of the behavior is currently locked. In other words, it's possible for the behavior of some extension methods to change (string.Proper() comes to mind), as well as having methods removed or added

You can download the source, directly from the repository at:
A compiled version will be made available in the future (once the project has matured a little)

The project itself will eventually have full documentation. But for those who are in doubt whether or not the library is worth downloading we have put up a list of contents.

Last edited Mar 12, 2009 at 8:07 AM by Jacco, version 8