.NET Async Utility

    08 October 2012

    Below is a simple C# class that I've used on many projects over the years for fire-and-forget type operations. For example, if you have a data collection service that pools multiple sources for information, you probably do not want to wait for the first remote call to finish before moving on to the next. This utility can be used to simply move that operation on to another thread to be executed.

    Log4Net Appender for Displaying Messages on a Windows Form Application

    15 December 2010

    Yesterday, I ran into a situation where I needed to display logging information on a WinForm application. The API that I wanted to show logging for was already using log4net for all of its logging, so the simplest way to accomplish my goal was to implement a custom log4net appender. The code below was the minimum that I needed, but there is room for enhancements as noted in the comments.

    Ignoring XPath Namespaces

    08 December 2010

    XML namespaces might be useful for resolving conflicts when combining segments from multiple XML entitied into a single file. They can also be extremely useful for versioning large complicated documents. But, to most developers who are merely trying to accomplish simple tasks in a short amount of time, they are nothing more than obstacles.

    Writing an SSRS Validation Tool

    25 October 2010

    I have been involved in a project that integrates with the Microsoft SQL Server Reporting Services (SSRS) web service API for quite a while now, and the majority of the issues I have seen are related to the configuration of SSRS and the installation of our product on top of SSRS.

    Retry Utility

    21 October 2010

    This morning I ran into a situation where I needed to retry several method calls if they failed. I decided that the easiest and cleanest way to accomplish this would be via a generic utility class. Below is the class I wrote. In the future I may add a method that will handle targets with void returns. But, for now, this is all my application required.

    Command Line Parsing

    12 February 2010

    From time to time, I am still asked to create a console application for someone, and most of the time PowerShell is still not accepted by my clients for various reasons. Just like method parameters can become unwieldy in an under-designed system as requirements change, so can command line arguments. To minimize the mess, regular expressions can be used to access a command/arguments pattern (e.g. EncryptionUtil.exe /Decrypt /File="C:\My Documents\foo.xml"). Furthermore, if argument are passed in as a key/value pairing (e.g. /File="C:\My Documents\foo.xml"), the order of the arguments should not matter.