Cool Utility Library in CUL (Craig's Utility Library)

Description

We all have utility classes we've built over time, classes and extensions that follow us from project to project. These utilities are usually just good enough to get the job done, but still they save us a great deal of time and effort.

But sometimes it would be easier to not have to write them in the first place.

What if there were a utility library that has something for everyone, one that's been growing for years and is under active development? And one were you can either grab the entire thing in one DLL or just those parts you need?

Oh and where the full source were available too?

Craig's Utility Library

Project Description
Craig's Utility Library (or CUL, as in cull because I'm not that creative), was initially designed through a number of projects that I've worked on. Over time I assembled a number of classes to handle various tasks and continue to add a number of items in my spare time. The library is written in C# and uses .Net 4.0 but many of the classes are usable in lower versions. More code can be found on my website: http://www.gutgames.com.

For a list of features, take a look at the List of Features page. Note that if you're updating from previous versions, this is a HUGE update and will break existing code. However the break was needed to push the code to a more manageable state.

We're talking a massive list of features...

image

Here's a few snips from the above List;

SNAGHTML13de109b

SNAGHTML13dea99f

SNAGHTML13df12fb

SNAGHTML13dfe3a2

SNAGHTML13e06b58

SNAGHTML13e1afa7

Here's a snip from the primary solution;

image

And I was saying you can get it as one package/dll with everything or just what you need? Here's a snap from the v3 Release folder. This shows

image

Note: If you've interested in running the included unit tests, you'll need to head over to the MoonUnit project (and see Building Your Own Unit Testing Framework in C# - Part 1 and Part 2). Also note the Library uses the .Net 4 Full and not Client profile.

Let's see it in action. One of the areas that I thought cool was the image stuff (well I thought many areas cool, but the image stuff is easier to show off... Smiley

Here's a very quick and dirty console test where I play with the ASCII Art extension.

SNAGHTML13f5858c

Where we take this picture;

SNAGHTML13f610ab 

And turn it into this (Shown in Notepad);

image

Just two lines of code (it could have been done in one) and it just worked (My favorite kind of code. )

The included Unit Tests are a great way to learn how to use the Library and there's also some auto-generated doc's included too.

The next time you feel the need to write a utility class/extension or block of re-usable code take a peek at CUL to see if the work has already been done for you... Smiley

The Discussion

  • User profile image
    James Craig

    I was wondering why my project was now number 1 in the "Projects Users are Following" category on CodePlex, and why my website spiked, and why I've received 10 emails in the past 2 days concerning the project... Greg is now my hero.

    Anyway, for people downloading the code and looking through the tests, you can actually switch out MoonUnit for xUnit.net without too much of an issue (MoonUnit was actually based off of xUnit 1.8). There are a couple differences though. And also I need to actually put out a new version of MoonUnit anyway as there are a number of bug fixes in the source that aren't in the app. Also, people that download this using NuGet, double check that you're using version 3.0 and not 2.0 (there was an errant package that was out there for a while). Oh and if anyone wants to volunteer to help out, contact me through the CodePlex site.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.