Craig’s Utility Library 2.2 Released

7/20/2011

Today is another release of my utility library. This one contains a number of new additions along with a number of fixes:

Additions:
1) CodeGen namespace, which helps with templated text/code generation.
2) Added ability to set free/busy status of appointments.
3) Added IsOfType function to tell if a specific type is a subtype of an interface/base class.
4) Added GetPropertyName function that does a better job when the data type of the property is known.
5) Added basic functions to DataTypeConversion class to convert between SqlDbType to .Net types and vice versa.
6) Added IFluentInterface interface that can be used to hide the ToString, etc. functions.
7) Added MicroORM set of classes, which acts as a simple object to relational mapper (similar to Dapper).
8) Added the ability to run multiple queries in one go in SQLHelper with the NextResult function (skips to the next result set).
9) Added ExecuteDataSet and ExecuteXmlReader functions for SQLHelper (to bring it more in line with the old SqlHelper class that Microsoft put out a while back).
10) Added DbTypeToNetType and NetTypeToDbType functions that convert from DbType to .Net types and vice versa. (also added DbTypeToSqlDbType and SqlDbTypeToDbType to convert between SqlDbType and DbType)
11) Simplified and merged ObjectCartographer project code. Now is housed in the Utilities.DataMapper namespace.
12) Added GetPropertySetter and GetPropertyGetter functions to generate Func and Actions on the fly for a property.
13) Added GetProperty function when type not known at compile time.
14) Added ; as separator in EmailSender class.
15) Added JSON serialization.
16) Merged YABOV project code. Now is housed in the Utilities.Validation namespace.
17) Merged Blammo.Net project code. Now is housed in the Utilities.IO.Logging namespace.
18) Merged Gestalt.Net project code. Now is housed in the Utilities.Configuration namespace.
19) Added function to FileManager that allows for setting attributes on a directory/files within it.
20) Added function to Reflection class that creates one instance of all classes that it finds of a specific interface/base class.
21) Added functions to load assemblies from a directory and create objects from a directory.
22) Added ability to search for file types in FileManager.
23) Merged Aspectus project code. Now housed in the Utilities.Reflection.AOP namespace.
24) Merged DotCache project code. Now housed in the Utilities.Caching namespace.
25) Merged Hateraide project code. Now housed in the Utilities.ORM namespace.
26) Added generic version of ExecuteScaler function in SQLHelper.


Fixes/Improvements:
1) Fixed minor issues with CSS StripWhitespace function.
2) Fixed minor issues with Javascript Minify function (now respects special comments as described by Yahoo Compressor documentation: http://developer.yahoo.com/yui/compressor/css.html).
3) Fixed issue with delimited files containing $.
4) Fixed issue in EmailSender if email addresses are empty/blank.
5) Improved the IsIEnumerable function to remove redundant code.
6) Rewrote SQLHelper class. Now uses DbFactories so more than just SQL Server is supported.
7) Added better parameter handling to SQLHelper.
8) Improved GetPropertyName function.
9) Added automatic opening/closing of a connection on functions where it is required (SQLHelper)
10) Added checks to SQLHelper for opening/closing a connection.
11) Added check in SQLHelper that if a field wasn't returned that the default value is instead returned.
12) Fixed various issues in SQLServer class.

And that's just the stuff that I was able to remember. I'm pretty sure that there is even more in this release. And that's not the end of my news. You see I've also finally sent in the request to CodePlex to switch the repository over to Mercury from SVN. Once that actually goes through I'll be adding it to BitBucket, Google Code, etc. as mirror sites. I've also merged a number of my projects in with this release (so if you were using them, you should probably take a look at the utility library as it was probably moved there).

This leads me to the future of this project. This release is going to be the last in the 2.0 line. The reason is not that I'm abandoning the project. It's sort of the opposite in that I plan to rewrite a good chunk of it. For instance the Image class is huge, static, etc. It needs to be simplified. The same goes for a number of classes. On top of that much of the initial code was written prior to .Net 3.0 being out. Many changes to C# have been added and I've been unable to keep up with all of it in regard to the library. Sadly as time is going on it's becoming more difficult to update/maintain. On top of that you may have noticed but there are no unit tests with the code. Up until recently the unit tests that I use are related to my work (the main reason I wrote most of the code was for my job so it makes sense). Since that was the case I couldn't release them. I want to change that. Also up until now the code's been a bit closed off to contributions, once again I want to change that also (hence I'm switching to Hg, which is a bit more conducive to that). In the coming days I plan to put up a few more details on the CodePlex site with regard to actual changes that I have planned, but for now download the code, leave feedback, and happy coding.



Comments